stateplus 0.1.0-dev.2
stateplus: ^0.1.0-dev.2 copied to clipboard
A minimal, high-performance reactive state management and navigation solution for Flutter.
StatePlus โก #
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.