isAt method Null safety
- BuildContext context
Returns true if the nearest enclosing Focus widget's node is focused.
A convenience method to allow build methods to write:
Focus.isAt(context) to get whether or not the nearest Focus above them
in the widget hierarchy currently has the input focus.
Calling this function creates a dependency that will rebuild the given context when the focus changes.
static bool isAt(BuildContext context) => Focus.maybeOf(context)?.hasFocus ?? false;