DataRowMessage constructor

DataRowMessage(
  1. Uint8List bytes
)

Implementation

DataRowMessage(Uint8List bytes) {
  final reader = ByteDataReader()..add(bytes);
  final fieldCount = reader.readInt16();

  for (var i = 0; i < fieldCount; i++) {
    final dataSize = reader.readInt32();

    if (dataSize == 0) {
      values.add(Uint8List(0));
    } else if (dataSize == -1) {
      values.add(null);
    } else {
      final rawBytes = reader.read(dataSize);
      values.add(rawBytes);
    }
  }
}