Skip to content
pubscout

dataflow

1.6.0, released 9 months ago by codepur.dev

A reactive state management library for Flutter using DataStore, DataAction, and streams.

WASM-ready
$ flutter pub add dataflow
Source repository

What it does

DataFlow provides centralized state management through a DataStore and handles asynchronous operations via DataAction classes. It includes UI binding widgets like DataSync and DataSyncNotifier to automatically rebuild widgets based on action execution status, and supports middleware for interception.

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

Use it when

  • You want centralized state management with explicit asynchronous actions.
  • You prefer a reactive approach driven by Dart streams and middleware support.

Skip it when

  • You are already heavily invested in alternative state management solutions like Provider, Riverpod, or Bloc.
  • You need a minimal-boilerplate solution without explicit action classes.

Strengths

  • Clear separation of actions and state stores.
  • Built-in middleware support for logging and error interception.
  • Per-action error tracking and status reset capabilities.

Weaknesses

  • Requires writing boilerplate classes for each DataAction.
  • Smaller ecosystem and community support compared to established alternatives like Bloc or Riverpod.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Initialize DataFlow with your DataStore in the main function before running the app.

void main() {
  DataFlow.init(MyDataStore());
  runApp(MyApp());
}

Alternatives

Packages that do the same job and could replace dataflow.

  • flutter_bloc

    Industry standard for predictable state management with robust event-to-state mapping and testing tools.

  • riverpod

    Compile-safe, provider-based state management that avoids widget tree lookup issues.

  • provider

    Simple and lightweight dependency injection and state management built directly on inherited widgets.

Works with

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