Skip to content
pubscout

flow_builder

0.1.0, released 3 years ago by felangel.dev

Simplifies navigation flows with a declarative API driven by state changes.

WASM-ready
$ flutter pub add flow_builder
Source repository

What it does

FlowBuilder is a Flutter widget that dynamically builds a navigation stack in response to changes in a flow state. It provides context extensions to easily update or complete the flow from any descendant widget.

AI-written summary of version 0.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to build multi-step flows like onboarding, wizards, or checkout processes.
  • You want to derive navigation pages declaratively from a model state.

Skip it when

  • You are building a complex app-wide router that requires URL-based deep linking and path templates.
  • You prefer an imperative Navigator API for screen transitions.

Strengths

  • Makes multi-step flows clean and easy to manage.
  • Decouples flow logic from UI widgets via FlowController and state updates.

Weaknesses

  • Not intended to replace a complete application router (like go_router or auto_route) for URL-based routing.
  • Limited to single-flow state management paradigms.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
FlowBuilder<Profile>(
  state: const Profile(),
  onGeneratePages: (profile, pages) {
    return [
      MaterialPage(child: NameForm()),
      if (profile.name != null) MaterialPage(child: AgeForm()),
    ];
  },
);

Alternatives

Packages that do the same job and could replace flow_builder.

  • go_router

    Pick it if you need robust declarative routing with URL path parameters, redirection, and web support.

  • auto_route

    Pick it if you prefer code generation for strongly typed routes and complex nested navigation.

Works with

Packages commonly used together with flow_builder: ones it builds on, ones built on it, and its own family.