Answers for "flutter sort list of objects"

2

sort a custom list flutter

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

flutter sort list by object property

List<Transaction> get sortByHighestTransactions {
    transactions.sort((txn1, txn2) => txn2.amount.compareTo(txn1.amount));
    return transactions;
  }
Posted by: Guest on March-16-2021

Code answers related to "flutter sort list of objects"

Browse Popular Code Answers by Language