[Flutter/dart] Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because ...
Phenomenon
When I try to build with Flutter I get the following error
Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null
By following the log, it seems that flutter_redux is issuing it.
The environment is Flutter 3.7.0, flutter_redux 0.10.0
Cause and Solution
I don't know the exact cause, but it seems to be a compatibility issue between the versions of Flutter and the flutter_redux library.
When I dropped flutter_redux to 0.9.0, the above error did not occur and I was able to build successfully.
Reference
https://github.com/brianegan/flutter_redux/issues/233
Recent Posts
See AllWhat want to do I want to create an input form using TextField. For example, if the input content is a monetary amount, I would like to...
What want to do There is a variable that remain unchanged once the initial value is determined. However, it cannot be determined yet when...
What want to do As the title suggests. Place two widgets in one line on the screen One in the center of the screen and the other on the...
Commenti