widgetbook
widgetbook copied to clipboard
Potential null value of `WidgetsBinding.instance`
It could not access toFocusManager because the instance of WidgetsBinding could be null.
Environment:
List of issues which are fixed by the PR
Error:
Property `focusManager` cannot be accessed on `WidgetBinding` because it is potentially null.
Screenshots
Checklist
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description above.
- [ ] I updated/added relevant documentation (doc comments with
///). - [ ] I added new tests to check the change I am making].
- [ ] All existing and new tests are passing.
This problem is quite tricky since Flutter 3.0 changed the instance property from nullable to non-nullable. Therefore, your change will cause problems for Flutter 3.0.
Then, could you change the CHANGELOG to reflect when this was changed and explain the requirements (we need Flutter 3) on the main documentation?
Widgetbook next stable release will not support Flutter 2.0.