toBytes method

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

Converts the layout into bytes.

Implementation

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