Answers for "flutter array object sort"

0

flutter sort list

someObjects.sort();

// By object property value
someObjects.sort((a, b) => a.someProperty.compareTo(b.someProperty));

// To reverse sort, just swab a and b
someObjects.sort((a, b) => b.someProperty.compareTo(a.someProperty));
Posted by: Guest on October-17-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language