-
Is there a way to show an InfoBar without having the BuildContext? Is there a way to get it done if you use FluentApp instead of MaterialApp? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
¹ You not having access to a build context is probably a design fault in your app. final navigatorKey = GlobalKey<NavigatorState>();
FluentApp(
navigatorKey: navigatorKey,
),
final context = navigatorKey.currentContext;
if (context != null) {
...
} |
Beta Was this translation helpful? Give feedback.
¹ You not having access to a build context is probably a design fault in your app.
² Yes, it is totally possible! You can use a
navigatorKey
to access the navigator context: