flushMessageRange method

void flushMessageRange(
  1. int fromId,
  2. int untilId
)

Implementation

void flushMessageRange(int fromId, int untilId) {
  // start, end: find insertion points (nearest == true).
  var since = _messages.find(DataMessage(seq: fromId), true);
  return since >= 0
      ? _messages.deleteRange(
          since, _messages.find(DataMessage(seq: untilId), true))
      : [];
}