cmdrootaccess / another-flushbar

A flexible widget for user notification. Customize your text, button, duration, animations and much more. For Android devs, it is made to replace Snackbars and Toasts.
https://pub.dev/packages/another_flushbar
MIT License
145 stars 88 forks source link

Could not navigate to initial route. #78

Open h-assefi opened 2 years ago

h-assefi commented 2 years ago

This is the error message I get

Could not navigate to initial route. The requested route name was: "/flushbarRoute" There was no corresponding route in the app, and therefore the initial route specified will be ignored and "/" will be used instead.

And, this is how I used Flushbar

Flushbar(
          title:  "ERROR",
          message:  "ErrorMessage",
          duration: const  Duration(seconds: 3),
          backgroundColor: Styles.getColorError(),
        ).show(NavigationService.navigatorKey.currentContext!);

NavigationService.navigatorKey.currentContext is a global context key.