contains method

  1. @override
bool contains(
  1. covariant num value
)
override

Checks whether the specified value belongs to the range, is equal to start or endInclusive or lies between them

Implementation

@override
bool contains(covariant num value) {
  if (start <= endInclusive) {
    return start <= value && value <= endInclusive;
  } else {
    return endInclusive <= value && value <= start;
  }
}