wrap method

WrappedMessage wrap([
  1. DateTime? timestamp
])

Returns a WrappedMessage representing this message with a timestamp

Implementation

WrappedMessage wrap([DateTime? timestamp]) => WrappedMessage(
  data: writeToBuffer(),
  name: messageName,
  timestamp: Timestamp.fromDateTime(timestamp ?? DateTime.now()),
);