// `_currentPromptRectRange` that controls the autocorrection highlight.

class

CustomTextInputClient

extends

State

<...>

implements

TextInputClient

@override

void

updateEditingValue

TextEditingValue

value

// When the text changes, the highlight needs to be dismissed.

if

value

text

!=

_value

text

setState

(()

_currentPromptRectRange

null

});

void

_handleFocusChanged

()

// When this text input loses focus, the autocorrection highlight needs