ComplexEnumCodec<V>.fromList constructor

ComplexEnumCodec<V>.fromList(
  1. List<MapEntry<String, Codec<V?>>?> list
)

Implementation

ComplexEnumCodec.fromList(List<MapEntry<String, Codec<V?>>?> list)
    : map = {
        for (var i = 0; i < list.length; i++)
          if (list[i] != null) list[i]!.key: list[i]!.value
      },
      _keyedIndex = {
        for (var i = 0; i < list.length; i++)
          if (list[i] != null) list[i]!.key: i
      },
      _keyedName = {
        for (var i = 0; i < list.length; i++)
          if (list[i] != null) i: list[i]!.key
      };