flutter_caffeine 3.0.0 copy "flutter_caffeine: ^3.0.0" to clipboard
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 via event(source) instead of event(source, null).
    • Scope.read(node) no longer accepts a listen: parameter outside Store.derive bodies — 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 via someStore(scope).
    • Disposed-scope operations throw StateError.
  • flutter SDK floor bumped from >=1.17.0 to >=3.10.0.

Improvements #

  • Caffeine.of(context) already threw FlutterError in 2.0; no behavioral change here.

2.0.0 #

Aligned with caffeine 2.0.0.

Breaking changes:

  • context.state(node) — parameter type changed from Stateful<T> to Store<T>
  • context.fire(event) — now requires an explicit value argument: context.fire(event, value)

Improvements:

  • Caffeine.of() throws a FlutterError instead of asserting — error is surfaced in release mode with a descriptive message
  • CaffeineInherited constructor forwards key

1.0.0 #

Initial release.

  • Caffeine widget — attaches a caffeine Scope to a point in the element tree and disposes it when the element is removed
  • context.state(node) — reads a Stateful or Store value from the nearest Caffeine ancestor; subscribes to automatic rebuilds when listen: true (the default)
  • context.fire(event) — dispatches an event through the nearest Caffeine ancestor's scope
  • Caffeine.of(context) — retrieves the nearest Scope for forking child scopes
  • Subscription cleanup via Finalizer — no dispose overrides or wrapper widgets required
0
likes
150
points
101
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

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.

Repository (GitHub)
View/report issues

Topics

#state-management #reactive #store #flutter

License

MIT (license)

Dependencies

caffeine, flutter

More

Packages that depend on flutter_caffeine