How to navigate in a CupertinoApp

321 Views Asked by At

With a MaterialApp you can provide the navigatorKey and use that in your middleware to redirect the user if necessary (as it's done in the flutter redux example).

But CupertinoApp doesn’t have a navigatorKey.

What we are doing now is to add the context to the action so we have access to it in the middleware, and can then user Navigator.of(context), but this seems very wrong.

What is the best way to achieve this?

1

There are 1 best solutions below

0
On BEST ANSWER

navigatorKey has been added to the CupertinoApp.