map<K2, V2> method

  1. @override
Map<K2, V2> map<K2, V2>(
  1. MapEntry<K2, V2> convert(
    1. K key,
    2. V value
    )
)
override

Map from a PersistentMap to a memory-resident map created by applying a mapping function to each key-value pair.

Implementation

@override
Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> Function(K key, V value) convert) {
  var result = <K2, V2>{};
  for (var e in entries) {
    final entry = convert(e.key, e.value);
    result[entry.key] = entry.value;
  }
  ;
  return result;
}