create static method

InstantMessage create(
  1. Envelope head,
  2. Content body
)

Create an InstantMessage from envelope and content.

head is the message envelope (routing metadata). body is the message content (payload).

Returns a new InstantMessage instance.

Implementation

static InstantMessage create(Envelope head, Content body) {
  final helper = sharedMessageExtensions.instantHelper;
  return helper!.createInstantMessage(head, body);
}