compareTo method
Compares this range to another range. First compare starts of the ranges. If start of this range is less than the start of the other, return -1, if it's greater, return 1. If both starts are equal, compare ends of the ranges.
other
The other range to compare to.
Returns a negative integer, zero, or a positive integer as this range is less than, equal to, or greater than the other range.
Implementation
@override
int compareTo(Range other) {
int startCmp = _startCmp(other as Range<TYPE>);
return startCmp != 0 ? startCmp : _endCmp(other);
}