Answers for "list.sort in flutter"

2

sort a custom list flutter

someObjects.sort((a, b) => a.someProperty.compareTo(b.someProperty));
Posted by: Guest on November-27-2020
7

sort list dart

List<int> nums = [13, 2, -11];
nums.sort();
print(nums);  // [-11, 2, 13]
Posted by: Guest on March-03-2020

Browse Popular Code Answers by Language