decode method

  1. @override
MapEntry<String, V?> decode(
  1. Input input
)
override

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));
}