avoid-focusable-offstage
Warns when the child of Offstage widget is focusable.
Offstage is a widget that lays the child out as if it was in the tree, but without painting anything, without making the child available for hit testing, and without taking any room in the parent.
However, Offstage children are still active: they can receive focus and have keyboard input directed to them.
To avoid the child to be focusable, wrap it with the ExcludeFocus widget.
Example
❌ Bad:
// LINT: The child widget can still receive focus even if it is not visible.
// Try wrapping the child widget with 'ExcludeFocus'.
Offstage(child: TextFormField());
✅ Good:
Offstage(child: ExcludeFocus(child: TextFormField()));