readValueOfType method

  1. @override
dynamic readValueOfType(
  1. int type,
  2. ReadBuffer buffer
)
override

Reads a value of the indicated type from buffer.

The codec can be extended by overriding this method, calling super for types that the extension does not handle. See the discussion at writeValue.

Implementation

@override
dynamic readValueOfType(int type, ReadBuffer buffer) {
  switch (type) {
    case _valuePairedInstance:
      return PairedInstance(
        readValueOfType(buffer.getUint8(), buffer) as String,
      );
    default:
      return super.readValueOfType(type, buffer);
  }
}