A particular problem ins implementing an adaptive scaffold is how to keep track of state in the form of the router changing. Sure you could try to use index-stack but that then messes up transitions if using the GoRouter Stateful Navigation Shell.
RydMike's Flex Scaffold uses a different approach of using a State Notifier to keep track of state of the Router. But how do we provide it to a stateful builder as its a non standard listener that is not using the SDK system of listeners.
We can do that via Hooks and Flutter Hooks using the Hooks API.
Keep reading with a 7-day free trial
Subscribe to Fred’s Flutter Newsletter to keep reading this post and get 7 days of free access to the full post archives.