Document the default -1,-1 selection (#96245)

Clarify in the docs about what an invalid selection means, contrasted with a 0,0 selection.
This commit is contained in:
Justin McCandless
2022-01-10 10:06:08 -08:00
committed by GitHub
parent b8c3662a37
commit 44849ab46a

View File

@@ -744,6 +744,9 @@ class TextEditingValue {
///
/// The [text], [selection], and [composing] arguments must not be null but
/// each have default values.
///
/// The default value of [selection] is `TextSelection.collapsed(offset: -1)`.
/// This indicates that there is no selection at all.
const TextEditingValue({
this.text = '',
this.selection = const TextSelection.collapsed(offset: -1),