encodeMessage method Null safety
- String? message
override
Encodes the specified message
in binary.
Returns null if the message is null.
Implementation
@override
ByteData? encodeMessage(String? message) {
if (message == null) {
return null;
}
final Uint8List encoded = utf8.encoder.convert(message);
return encoded.buffer.asByteData();
}