readValueOfType method Null safety

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

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.


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