fromId method Null safety

MessageSequence fromId(
  1. int id,
  2. {bool isUid = false}
)

Convenience method for getting the sequence for a single id.

Optionally specify the if the ID is a UID with isUid, defaults to false.

Implementation

static MessageSequence fromId(int id, {bool isUid = false}) {
  final sequence = MessageSequence(isUidSequence: isUid);
  sequence.add(id);
  return sequence;
}