Skip to content
pubscout

flutter_triple

3.0.0, released 3 years ago by flutterando.com.br

Flutter state‑management library implementing the Segmented State Pattern (Triple).

WASM-ready
$ flutter pub add flutter_triple
Source repository

What it does

Provides a Store that holds state, error and loading flags and widgets like TripleConsumer and TripleListener to rebuild UI based on those segments. Offers scoped listeners and utilities for selecting parts of the state.

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

Use it when

  • You need unified handling of state, error and loading in a Flutter app.
  • You want widget‑level listeners for specific Triple segments.

Skip it when

  • Your app has trivial state that doesn't require a full Triple pattern.
  • You rely heavily on code‑generation solutions for state management.

Strengths

  • Clear separation of state, error and loading segments.
  • Built‑in widgets for consuming and listening to Triple stores.
  • Supports scoped selection of state parts.

Weaknesses

  • Recent breaking changes may require migration effort.
  • Documentation is limited to a brief README.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3
TripleListener(
  store: counter,
  listener: (context, triple) => print(triple.state),
  child: Container(),
);

Alternatives

Packages that do the same job and could replace flutter_triple.

  • yx_state

    A state management library for Dart and Flutter applications.

  • bloc

    A Dart library for implementing the BLoC pattern with Cubits and Blocs.

  • cached_query

    Library for caching, background fetching, and managing server state in Dart and Flutter.

  • flutter_bloc

    Flutter widgets to easily integrate blocs and cubits for state management.

Works with

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