Migration guide

The EditableText widget takes a FocusNode as a paramter, which was
previously attached to its EditableText’s BuildContext. If you are relying
on runtime typecheck to find out if a FocusNode is attached to a text input
field or a selectable text field like so:

focusNode.context.widget is EditableText

(focusNode.context as StatefulElement).state as EditableTextState

Then please read on and consider following the migration steps to avoid breakages.

If you’re not sure whether a codebase needs migration, search for is EditableText,
as EditableText, is EditableTextState, and as EditableTextState and verify if
any of the search results are doing a typecheck or typecast on a FocusNode.context.
If so, then migration is needed.

Code before migration:

final

Widget

focusedWidget

primaryFocus

?.