StatePlus โšก

Pub Version | License: MIT

A minimal, high-performance reactive state management and navigation solution for Flutter.

StatePlus is designed to eliminate boilerplate, avoid unnecessary rebuilds, and unify state + navigation into a single reactive system.


โœจ Features

  • โšก Fine-grained reactivity (only rebuilds what changes)
  • ๐Ÿง  Simple primitives: Signal, Computed, Effect
  • ๐Ÿงฑ Minimal rebuild widgets (StateWidget)
  • ๐Ÿงญ State-driven navigation (no Navigator push/pop)
  • โŒ No BuildContext dependency for state
  • โŒ No code generation
  • ๐Ÿš€ Extremely fast & predictable

๐Ÿ“ฆ Installation

dependencies:
  stateplus: ^0.1.0-dev.2

๐Ÿง  Core Concepts:

Concept Description
Signal Reactive value holder
Computed Derived reactive value
StateWidget Widget that rebuilds only when needed
RouteState Navigation as state

๐Ÿงช Basic Example:

final counter = Signal(0);
final doubleCounter = Computed(() => counter.value * 2);

StateWidget(
    builder: () => Text('Count: ${counter.value}'),
)

๐Ÿงญ Navigation as State:

final router = RouteState();
router.go('/details');

StateRouter(
router: router,
routes: {
    '/': () => HomePage(),
    '/details': () => DetailsPage(),
 },
);

No Navigator.push, no BuildContext.

๐Ÿ”ฅ Why StatePlus?

Library Problem
Bloc Too much boilerplate
Provider Context-heavy
Riverpod Over-abstracted
Redux Verbose & rigid
  • StatePlus = minimal + predictable + fast

๐Ÿšง Roadmap:

  • Async signals
  • Error handling
  • Scoped state trees
  • URL sync for Flutter Web
  • DevTools integration

๐Ÿค Contributing

  • PRs are welcome.
  • Please open an issue before major changes.

Libraries

core/computed
core/effect
core/observer
core/signal
navigation/route_state
navigation/router
stateplus
StatePlus: A lightweight reactive state management and navigation library for Flutter.
widgets/state_widget