decode method
Implementation
@override
MapEntry<String, V?> decode(Input input) {
final index = input.read();
if (_keyedName[index] == null) {
throw EnumException('Invalid enum index: $index.');
}
final palletName = _keyedName[index]!;
return MapEntry(palletName, map[palletName]!.decode(input));
}