ComplexEnumCodec<V>.sparse constructor

ComplexEnumCodec<V>.sparse(
  1. Map<int, MapEntry<String, Codec<V?>>> map
)

Implementation

ComplexEnumCodec.sparse(Map<int, MapEntry<String, Codec<V?>>> map)
    : _keyedIndex = {
        for (final entry in map.entries) entry.value.key: entry.key
      },
      _keyedName = {
        for (final entry in map.entries) entry.key: entry.value.key
      },
      map = {
        for (final entry in map.entries) entry.value.key: entry.value.value
      };