TextSelection.collapsed constructor

const TextSelection.collapsed({@required int offset, TextAffinity affinity: TextAffinity.downstream })

Creates a collapsed selection at the given offset.

A collapsed selection starts and ends at the same offset, which means it contains zero characters but instead serves as an insertion point in the text.

The offset argument must not be null.

Implementation

const TextSelection.collapsed({
  @required int offset,
  this.affinity = TextAffinity.downstream
}) : baseOffset = offset, extentOffset = offset, isDirectional = false, super.collapsed(offset);