-
-
Notifications
You must be signed in to change notification settings - Fork 4
How to navigate
Plague Fox edited this page Jan 9, 2024
·
2 revisions
Use the context.octopus.setState((state) => ...)
method as a basic navigation method.
And realize any navigation logic inside the callback as you please.
context.octopus.setState((state) =>
state
..findByName('catalog-tab')?.add(Routes.category.node(
arguments: <String, String>{'id': category.id},
)));
Of course, there are other ways to navigate, primarily shortcuts for the most common cases.
context.octopus.push(Routes.shop)
But you can truly do anything you want. Just change the state, children, nodes, and arguments as you please. Everything is in your hands and just works fine, that's a declarative approach as it should be.