Urutkan daftar DART
List<int> nums = [13, 2, -11];
nums.sort();
print(nums); // [-11, 2, 13]
Expensive Elk
List<int> nums = [13, 2, -11];
nums.sort();
print(nums); // [-11, 2, 13]
someObjects.sort((a, b) => a.someProperty.compareTo(b.someProperty));