Skip to main content

cobalt_flutter 0.2.0 copy "cobalt_flutter: ^0.2.0" to clipboard
cobalt_flutter: ^0.2.0 copied to clipboard

Flutter bindings for Cobalt — scope providers, widget-owned child scopes and BuildContext resolution helpers.

0.2.0 #

  • CobaltAsyncBuilder<T>: resolves with getAsync and builds from the result, showing loading meanwhile and errorBuilder (with retry) on failure. Something already built renders without a frame of loading. The resolution is held in state, so a parent rebuild neither restarts it nor retries a failed one by itself.
  • context.cobaltAsync<T>().
  • CobaltAppScope and CobaltAppScope.builder take overrides: — a function, like bootstrap, called on every start and restart, so a restart does not get back a value the previous graph already closed.

0.1.2 #

  • No code changes in this package. Republished in lockstep with a packaging fix in cobalt 0.1.2 (a stray file removed from its archive) — see its changelog. A fix in one package still ships as a patch for all fifteen, because publishing a subset is what lets the set drift.

0.1.1 #

  • No code changes in this package. Republished in lockstep with the fix in cobalt_lint 0.1.1 — see its changelog. Lockstep is the whole versioning policy: a fix in one package still ships as a patch for all fifteen, because publishing a subset is what lets the set drift.

0.1.0 #

  • CobaltNoScopeError and CobaltNoAppScopeError replace the bare CobaltError the two lookups used to throw, so a caller can catch the one it means. The first also explains the pushed-route case in its message.
  • Initial release.
  • CobaltAppScope: owns the root scope for the whole app. It builds the graph inside runApp, shows loading and error states with retry, exposes restart(), and disposes the root on unmount. Because it re-keys the provider, the subtree rebuilds against the new root after a restart.
  • CobaltScopeWidget: a child scope whose lifetime is a widget's lifetime.
  • CobaltScopeProvider and context.cobalt<T>(), plus CobaltScopedWidget and CobaltScopedStatefulWidget as bases.
  • disposeOnExitRequest is opt-in and only meaningful on macOS and Linux, where onExitRequested fires and the exit is actually cancellable.
0
likes
0
points
1.61k
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter bindings for Cobalt — scope providers, widget-owned child scopes and BuildContext resolution helpers.

Repository (GitHub)
View/report issues

Topics

#dependency-injection #di #flutter #scopes

License

unknown (license)

Dependencies

cobalt, flutter

More

Packages that depend on cobalt_flutter