sortedValuesByKey method

List<V> sortedValuesByKey(
  1. int compare(
    1. K,
    2. K
    )?
)

Implementation

List<V> sortedValuesByKey(int Function(K, K)? compare) {
  List<K> k = this.keys.sorted(compare);
  return List.generate(k.length, (index) => this[k[index]]!);
}