addRange method

void addRange(
  1. int start,
  2. int end
)

Adds all messages between start and end inclusive.

Implementation

void addRange(int start, int end) {
  // start:end
  if (start == end) {
    add(start);
    return;
  }
  final wasEmpty = isEmpty;
  if (start < end) {
    _ids.addAll([for (int i = start; i <= end; i++) i]);
  } else {
    _ids.addAll([for (int i = end; i <= start; i++) i]);
  }
  _text = wasEmpty ? '$start:$end' : null;
}