decode method
Implementation
@override
MapEntry<String, V> decode(Input input) {
final index = input.read();
final type = map[index];
if (type == null) {
throw EnumException('Invalid enum index: $index.');
}
final codec = registry.getCodec(type);
assertion(codec != null, 'Codec for type: $type not found.');
return MapEntry(type, codec!.decode(input));
}