encodeTo method
Convert self to a slice and append it to the destination.
Implementation
@override
void encodeTo(MapEntry<String, V?> value, Output output) {
if (_keyedIndex[value.key] == null) {
throw EnumException(
'Invalid enum value: ${value.key}. Can only accept: ${_keyedIndex.keys.join(', ')}');
}
final int palletIndex = _keyedIndex[value.key]!;
output.pushByte(palletIndex);
map[value.key]!.encodeTo(value.value, output);
}