sort object list flutter code example
Example: flutter sort list by object property
List get sortByHighestTransactions {
transactions.sort((txn1, txn2) => txn2.amount.compareTo(txn1.amount));
return transactions;
}
List get sortByHighestTransactions {
transactions.sort((txn1, txn2) => txn2.amount.compareTo(txn1.amount));
return transactions;
}