sequential_flow library

A Flutter library for creating sequential, step-by-step flows with customizable UI and navigation.

This library provides a declarative way to build multi-step processes such as:

  • User onboarding flows
  • Data processing workflows
  • Form wizards
  • Setup processes

Core Components

  • SequentialFlow: The main widget for displaying and managing flow execution
  • FlowController: Controls flow state, navigation, and data management
  • FlowStep: Defines individual steps with their logic and behavior
  • ActionOnPressBack: Configures back button navigation behavior

Basic Usage

import 'package:sequential_flow/sequential_flow.dart';

SequentialFlow<MySteps>(
  steps: [
    FlowStep(
      step: MySteps.welcome,
      name: 'Welcome',
      progressValue: 0.33,
      onStepCallback: () async {
        // Your step logic here
      },
    ),
    // ... more steps
  ],
  onStepLoading: (step, name, progress) => YourLoadingWidget(),
  onStepFinish: (step, name, progress, controller) => YourCompletionWidget(),
)

For more examples and advanced usage, see the documentation for individual components.

Classes

FlowController<T>
Controls the execution and state of a sequential flow.
FlowStep<T>
Represents a single step in a sequential flow.
SequentialFlow<T>
A widget that executes and displays a sequential flow of steps.
SequentialFlowState<T>
Internal state class for SequentialFlow.

Enums

ActionOnPressBack
Defines the behavior when the back button is pressed during flow execution.

Typedefs

OnStartStep = Future<void> Function(FlowController controller)
A callback function that is executed when a step starts.