writeTo method Null safety

void writeTo(
  1. int messageSize,
  2. MqttByteBuffer messageStream
)

Writes the header to a supplied stream.

Implementation

void writeTo(int messageSize, MqttByteBuffer messageStream) {
  _messageSize = messageSize;
  final headerBuff = headerBytes();
  messageStream.write(headerBuff);
}