-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Request to add a list item on the breaking changes for Flutter V3.35 as listed here
The following item from the Flutter Changelog seems to have caused a breaking change:
Add flag to exclude focus for hidden children in Visibility, maintainFocusability. Set maintainFocusability to false in IndexedStack by @skimm3 in 159133
To get the same working as in previous Flutter versions you now have to manually set maintainFocusability to true. In this case the default value results in different behaviour from the previous version.
For example when using an invisible text field to allow for input being rendered in a way which TextField doesn't allow for you'd use something alike (with a way to set focus on the field):
Visibility(
visible: false,
maintainState: true,
child:TextField(/****/),
),This used to work but now one has to add maintainFocusability: true, to get the same result.
It would be useful to have a mention on the breaking changes which says something alike: Visibility Widgets relying on being able to focus a child element of said widget now require the new parameter maintainFocusability: true, to be set.