Reading a bit_flags enum where multiple values are set throws an exception:
Unhandled exception:
RangeError (byteOffset): Index out of range: no indices are valid: 3
#0 _byteDataByteOffsetCheck (dart:typed_data-patch/typed_data_patch.dart:5419:5)
#1 _ByteDataView.getUint32 (dart:typed_data-patch/typed_data_patch.dart:5191:5)
#2 BufferContext._getUint32 (package:flat_buffers/flat_buffers.dart:68:41)
#3 BufferContext.derefObject (package:flat_buffers/flat_buffers.dart:40:43)
#4 TableReader.read (package:flat_buffers/flat_buffers.dart:1119:29)
...
Schema:
enum DigitalInputs: ubyte (bit_flags) {
DI_CLK1,
DI_CLK2,
DI_S1,
DI_S2,
}
table Holder {
digital_inputs: DigitalInputs;
}
Reading a bit_flags enum where multiple values are set throws an exception:
Schema: