flutter_caffeine 2.0.0 copy "flutter_caffeine: ^2.0.0" to clipboard
flutter_caffeine: ^2.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.

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
140
points
99
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