state_forge_core 0.1.2
state_forge_core: ^0.1.2 copied to clipboard
Pure Dart state management primitives for StateForge stores, effects, persistence, observers, and testing.
state_forge_core #
Pure Dart core primitives for StateForge.
This package contains the framework-independent store engine used by the
Flutter-facing state_forge package:
Store<S>with listener-based state updatesAsyncState<T>sealed variantseffect()streams for one-time eventsguard(),optimistic(), and resource cleanupUndoableStore,PersistableStore, andCompositedStoreStateForgeconfiguration, storage, diagnostics, and observer hooks
Use this package directly when you want StateForge store logic in a pure Dart
package, CLI, backend, or shared module. Flutter apps should usually depend on
state_forge, which re-exports these core APIs and adds widget-tree integration.
import 'package:state_forge_core/state_forge_core.dart';
class CounterStore extends Store<int> {
CounterStore() : super(0);
void increment() => emit(state + 1);
}