toBytes method

  1. @override
List<int> toBytes()
override

Converts the layout into bytes.

Implementation

@override
List<int> toBytes() {
  final LayoutByteWriter data =
      LayoutByteWriter(_layout.span + message.length);
  layout.encode(serialize(), data);
  data.setAll(messageDataOffset, message);
  return data.toBytes();
}