You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't use GlobalKey as you do on flutter SDK >= 2.12.0
For example i got the error below on NavigationController :
Error: Method 'pushNamed' cannot be called on 'NavigatorState?' because it ispotentially null.
I add also to change the topNavigationBar function to a StatelessWidget class extending PreferredSizeWidget and use Scaffold.of(context) instead of scaffoldKey to make it work.
I have no idea how to fix this error on NavigationController.
The text was updated successfully, but these errors were encountered:
@Santos-Enoque hello! Any help here maybe? I've also faced similar issue:
lib/widgets/top_nav.dart:15:24: Error: Method 'openDrawer' cannot be called on 'ScaffoldState?' because it is potentially null.
- 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('../../flutter/packages/flutter/lib/src/material/scaffold.dart').
Try calling using ?. instead.
key.currentState.openDrawer();
^^^^^^^^^^
Hi
I can't use GlobalKey as you do on flutter SDK >= 2.12.0
For example i got the error below on NavigationController :
Error: Method 'pushNamed' cannot be called on 'NavigatorState?' because it ispotentially null.
I add also to change the topNavigationBar function to a StatelessWidget class extending PreferredSizeWidget and use Scaffold.of(context) instead of scaffoldKey to make it work.
I have no idea how to fix this error on NavigationController.
The text was updated successfully, but these errors were encountered: