TextRange constructor
Creates a text range.
The start
and end
arguments must not be null. Both the start
and
end
must either be greater than or equal to zero or both exactly -1.
The text included in the range includes the character at start
, but not
the one at end
.
Instead of creating an empty text range, consider using the empty constant.
Implementation
const TextRange({
this.start,
this.end,
}) : assert(start != null && start >= -1),
assert(end != null && end >= -1);