TextSelection
TextSelection
#
A range of text that represents a selection.
affinity
#
affinity: TextAffinity | None = None
If the text range is collapsed and has more than one visual location (e.g., occurs at a line break), which of the two locations to use when painting the caret.
collapsed
#
collapsed: bool | None = None
Whether this range is empty (but still potentially placed inside the text).