📜  从 dart 代码示例中的特定映射键降序排序列表

📅  最后修改于: 2022-03-11 14:48:07.530000             🧑  作者: Mango

代码示例1
// if you want to sort obejects descendingly, use b compare to a
 
 topContributors.sort((a, b) => b['amount'].compareTo(a['amount']));
 
 // if you want to reverse the order of list, just use
 
 topContributors.reversed.toList();