Open Leffe108 opened 2 years ago
Thanks for the suggestion! This is a feature we have been considering adding - glad to hear that it would be useful.
While searching for a way to debug a similar focus problem as @Leffe108, I came across this issue. A DevTools feature that draws a frame around the currently focused element would be really helpful!
To everyone who comes by as long this feature request has not yet been implemented:
Try debugDumpFocusTree! It calls FocusManager.instance.toStringDeep();
and prints the current focus tree to the console.
@jsiedentop it's not specified where to put it exactly in the code ? it's not specified.
It would be useful if focusNodes was possible to see in the widget inspector tree and also see which one is currently focused.
The only solution I found to figure out which focusNode has foucs is to
An alternative also helpful feature would be if I could do the following:
FocusScope.of(context).focusedChild
in the watch windowUse case
In the case I try to debug there is four buttons on the screen and when I tab from the third one, there is an invisible focus node somewhere that I think receives the focus as the fourth button does not receive focus when I have wrapped it in a Link widget. I did a simplified case that did not reproduce this bug, so in my big app I want to try to understand where this focus node is coming from.