encodeMessage method

  1. @override
ByteData? encodeMessage(
  1. 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;
  }
  return ByteData.sublistView(utf8.encode(message));
}