toEntryList method
Returns a List of the map entries.
The list will be sorted if the map's sort
configuration is true
,
or if you explicitly provide a compare
method.
Implementation
List<MapEntry<K, V>> toEntryList({int Function(MapEntry<K, V> a, MapEntry<K, V> b)? compare}) {
var result = List<MapEntry<K, V>>.of(entries);
if (compare != null || config.sort) result.sort(compare ?? compareObject);
return result;
}