getMapSortByValue method

dynamic getMapSortByValue(
  1. Map map,
  2. bool isAsc
)

Implementation

getMapSortByValue(Map map, bool isAsc) {
  myLogAll('getMapSortByValue');
  final sortedKeys = SplayTreeMap.from(
      map,
      (keys1, keys2) => isAsc
          ? map[keys1].compareTo(map[keys2])
          : map[keys2].compareTo(map[keys1]));
  return sortedKeys;
}