Ability to remove keyboard focus from the entire tree #14409
Labels
c: new feature
Nothing broken; request for a new capability
f: material design
flutter/packages/flutter/material repository.
framework
flutter/packages/flutter repository. See also f: labels.
Steps to Reproduce
I would like to show the hintText of a textField until the user touches somewhere else.
The touchpoint could be deep in the widget tree and I dont know how to obtain the current focused node somewhere in the widget tree to call unfocused, to show the textField inactive and hide the keyboard. This might be just an issue with my understanding of flutter or the documentation which lacks example and does not explain how to use the patterns.
The code example shows the GestureDetector which is calling unfocus on the node. This is simple here because the focusNode is easily accessible in the same widget. The question here is how to do the same in a nested widget tree. What is the recommended pattern to do so?
Flutter Doctor
The text was updated successfully, but these errors were encountered: