subsequence method Null safety

MessageSequence subsequence(
  1. int start,
  2. [int? end]
)

Creates a new sequence containing the message IDs/UIDs between start (inclusive) and end (exclusive)

Implementation

MessageSequence subsequence(int start, [int? end]) {
  final sublist = _ids.sublist(start, end);
  final subsequence = MessageSequence(isUidSequence: isUidSequence);
  subsequence._ids.addAll(sublist);
  return subsequence;
}