flutter_caffeine 3.0.0
flutter_caffeine: ^3.0.0 copied to clipboard
Flutter bindings for caffeine. Attach reactive scopes to the widget tree, read store state with context.state(), fire events with context.fire() — no StreamBuilders, no dispose boilerplate.
3.0.0 — 2026-05-28 #
Aligned with caffeine 3.0.0. See its CHANGELOG for the underlying API changes.
Breaking #
- Pulls in caffeine 3.0.0 — every breaking change there applies through the flutter bindings:
Event<void>instances now fire viaevent(source)instead ofevent(source, null).Scope.read(node)no longer accepts alisten:parameter outsideStore.derivebodies — it's a compile error, not a runtime throw.- Stores can no longer be called as if they were events (
someStore(scope, value)no longer compiles); they remain readable viasomeStore(scope). - Disposed-scope operations throw
StateError.
flutterSDK floor bumped from>=1.17.0to>=3.10.0.
Improvements #
Caffeine.of(context)already threwFlutterErrorin 2.0; no behavioral change here.
2.0.0 #
Aligned with caffeine 2.0.0.
Breaking changes:
context.state(node)— parameter type changed fromStateful<T>toStore<T>context.fire(event)— now requires an explicit value argument:context.fire(event, value)
Improvements:
Caffeine.of()throws aFlutterErrorinstead of asserting — error is surfaced in release mode with a descriptive messageCaffeineInheritedconstructor forwardskey
1.0.0 #
Initial release.
Caffeinewidget — attaches a caffeineScopeto a point in the element tree and disposes it when the element is removedcontext.state(node)— reads aStatefulorStorevalue from the nearestCaffeineancestor; subscribes to automatic rebuilds whenlisten: true(the default)context.fire(event)— dispatches an event through the nearestCaffeineancestor's scopeCaffeine.of(context)— retrieves the nearestScopefor forking child scopes- Subscription cleanup via
Finalizer— nodisposeoverrides or wrapper widgets required