toSortedList method
Get a sorted List of the key/value pairs contained in this Map
based on order on keys.
See also collect.
Implementation
List<MapEntry<K, V>> toSortedList(Order<K> order) => entries.sortWith(
(map) => map.key,
order,
);