Skip to content
pubscout

triple

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

Abstraction for the Segmented State Pattern to create custom state stores.

WASM-ready
$ flutter pub add triple
Source repository

What it does

It provides a core architecture for separating state into three segments: state value, error, and loading status. Developers can build custom reactive stores on top of any reactivity system like Streams, ValueNotifier, or MobX.

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

Use it when

  • You want to implement the Segmented State Pattern using custom reactivity.
  • You need built-in state history management with MementoMixin.

Skip it when

  • You prefer ready-made mainstream state management solutions without building custom stores.
  • You are looking for pre-built UI widget bindings directly inside the core library.

Strengths

  • Flexibility to use any reactivity system as a basis.
  • Built-in support for middleware, executors, and tracking.

Weaknesses

  • Requires manual boilerplate setup to implement reactive stores.
  • Documentation relies on external web links for deep dives.

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
2
class Counter extends StreamStore<Exception, int> {
  Counter(0): super(0);
}

Alternatives

Packages that do the same job and could replace triple.

  • bloc

    If you want a fully featured, production-ready state management library with built-in event handling instead of creating a custom store abstraction.

  • riverpod

    If you want compile-safe dependency injection and reactive state providers without managing store classes.

Works with

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