sortMapEntriesByKey<K, V> function

Map<K, V?> sortMapEntriesByKey<K, V>(
  1. Map<K, V?> map, [
  2. bool reversed = false
])

Returns a Map sorted by keys.

Implementation

Map<K, V?> sortMapEntriesByKey<K, V>(Map<K, V?> map, [bool reversed = false]) =>
    sortMapEntries(
        map, (a, b) => parseComparable(a.key)!.compareTo(b.key), reversed);