TextRange.collapsed constructor

const TextRange.collapsed(
  1. int offset
)

A text range that starts and ends at offset.

The offset argument must be non-null and greater than or equal to -1.

Implementation

const TextRange.collapsed(int offset)
    : assert(offset != null && offset >= -1), // ignore: unnecessary_null_comparison
      start = offset,
      end = offset;