wrap<T> static method

MappedDecoder wrap<T>(
  1. KeyedDecoder decoder
)

Implementation

static MappedDecoder wrap<T>(KeyedDecoder decoder) {
  final map = <Object, KeyedDecoder>{};
  for (Object? key; (key = decoder.nextKey()) != null;) {
    map[key!] = decoder.clone();
    decoder.skipCurrentValue();
  }
  return CompatMappedDecoder._(decoder, map);
}