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

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



Solution 1:[1]

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?".

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 roil
Solution 2 Karunjith M