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