create static method

Envelope create({
  1. required ID sender,
  2. required ID receiver,
  3. DateTime? time,
})

Create a new Envelope with the given routing metadata.

sender is the ID of the message sender. receiver is the ID of the message receiver (user/group). time is the message timestamp (defaults to current time if null).

Returns a new Envelope instance.

Implementation

static Envelope create({required ID sender, required ID receiver, DateTime? time}) {
  final helper = sharedMessageExtensions.envelopeHelper;
  return helper!.createEnvelope(sender: sender, receiver: receiver, time: time);
}