flow_builder
Flutter Flows made easy! A Flutter package which simplifies flows with a flexible, declarative API.
Usage
Define a Flow State
The flow state will be the state which drives the flow. Each time this state changes, a new navigation stack will be generated based on the new flow state.
Create a FlowBuilder
FlowBuilder
is a widget which builds a navigation stack in response to changes in the flow state. onGeneratePages
will be invoked for each state change and must return the new navigation stack as a list of pages.
Update the Flow State
The state of the flow can be updated via context.flow<T>().update
.
Complete the Flow
The flow can be completed via context.flow<T>().complete
.
FlowController
A FlowBuilder
can also be created with a custom FlowController
in cases where the flow can be manipulated outside of the sub-tree.