isInRange method

bool isInRange(
  1. int start,
  2. int end
)

Whether this item's index is within the specified range (inclusive).

Implementation

bool isInRange(int start, int end) => index >= start && index <= end;