read method

  1. @override
String read(
  1. MemoryPointer<RType> p
)
override

Implementation

@override
String read(MemoryPointer p) {
  _check(p, 'read string');
  return switch (type) {
    RInt8() => p.cast<RInt8>().toDartString(),
    RInt16() => p.cast<RInt16>().toDartString(),
    RInt32() => p.cast<RInt32>().toDartString(),
    _ => throw UnsupportedError("Invalid type $R for reading a string value."),
  };
}