// the find
felangel/flow_builder
Flutter Flows made easy! A Flutter package which simplifies navigation flows with a flexible, declarative API.
A small Flutter package that models a multi-step flow as one state object, where onGeneratePages turns that state into the navigation stack on every change. It suits onboarding, checkout, and form-wizard flows where the screens depend on data collected so far.
The page stack is a pure function of the state object, so you can check which screens appear for a given state by calling onGeneratePages directly in a unit test, with no widget tree to pump. Pages reach the flow through context.flow<T>() from anywhere in the subtree, so screens don't need callbacks or constructor arguments passed down from the parent. The whole API is four pieces (FlowBuilder, your state class, update and complete, and an optional FlowController), so there is little to learn and little to get wrong.
Immutability and copyWith are left entirely to you. The README's Profile class has three fields; at ten fields this is a lot of hand-written boilerplate, and the package doesn't help with it. It sits on the Navigator pages API rather than Router, so URL-based deep linking and browser history on web are outside what it does. The README code has a sharp edge that people will copy: int.parse in onChanged throws a FormatException on empty or partial input, and RaisedButton is the button Flutter deprecated in favour of ElevatedButton. The last push was 27 November 2024, nearly two years before this review, so the package has not kept up with where Flutter navigation has gone.