contains method
True if input is between start (inclusive) and stop.
If stopExclusive is false, stop is included in the range, otherwise it is not.
Note that step is considered in the evaluation - the input
must be an increment of the range.
As this method calls toList, it can be expensive and you
should consider caching the result of toList and calling
that list's contains method.
Implementation
bool contains(num input) => toList().contains(input);