toDartMap<K, V> method
Convert this CBOR map to a Dart Map<K, V> by mapping keys and values.
keyMapper → transforms each CBOR key to K
valueMapper → transforms each CBOR value to V
Implementation
Map<K, V> toDartMap<K, V>(
CborKeyMapper<K> keyMapper,
CborKeyMapper<V> valueMapper,
) {
final entries = value.entries.map(
(e) => MapEntry<K, V>(keyMapper(e.key), valueMapper(e.value)),
);
return Map<K, V>.fromEntries(entries);
}