Flutter 3 : Warning : Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null

2.3k Views Asked by At

I just upgraded to Flutter 3 and my flutter project console is full of warnings. Did anyone know how to fix these warnings or should I wait for the stable update from flutter itself.

enter image description here

2

There are 2 best solutions below

2
On

The issue is due to the presence of outdated packages. You can fix this by running flutter pub upgrade inside your app directory

0
On

I believe that it suggests you to remove the '!' operand because the class method you have used now returns an Object of type "WidgetBinding" instead of "WidgetBinding?".