ComparableRange<T extends Comparable<T>> constructor

ComparableRange<T extends Comparable<T>>(
  1. T start,
  2. T endInclusive
)

Create a range of Comparable values such as String or DateTime

The order of start and endInclusive doesn't matter.

Implementation

ComparableRange(this.start, this.endInclusive)
    : assert(() {
        if (start == null) throw ArgumentError("start can't be null");
        if (endInclusive == null) {
          throw ArgumentError("endInclusive can't be null");
        }
        return true;
      }());