Unverified Commit 44849ab4 authored by Justin McCandless's avatar Justin McCandless Committed by GitHub

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

Clarify in the docs about what an invalid selection means, contrasted with a 0,0 selection.
parent b8c3662a
...@@ -744,6 +744,9 @@ class TextEditingValue { ...@@ -744,6 +744,9 @@ class TextEditingValue {
/// ///
/// The [text], [selection], and [composing] arguments must not be null but /// The [text], [selection], and [composing] arguments must not be null but
/// each have default values. /// 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({ const TextEditingValue({
this.text = '', this.text = '',
this.selection = const TextSelection.collapsed(offset: -1), this.selection = const TextSelection.collapsed(offset: -1),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment