cobalt_flutter 0.3.0
cobalt_flutter: ^0.3.0 copied to clipboard
Flutter bindings for Cobalt — scope providers, widget-owned child scopes and BuildContext resolution helpers.
0.3.0 #
overridesonCobaltScopeWidget, and anoverridesgetter onCobaltScopedWidgetandCobaltScopedStatefulWidget. A function called on every mount, as onCobaltAppScope, so a remount never gets a value the previous scope already closed. It replaces what that scope registers; an override of a key an ancestor owns fails naming the owner.CobaltAppScope(warmUp: [...])— also on.startand.builder— starts building lazy async registrations as soon as the graph is up, behind the app rather than behindloading. A failure goes toFlutterError.reportError.- Fixed: a builder that threw on a widget-owned scope, or an override that
replaced nothing, left the pushed child in the tree with nobody to close it.
The error now reaches
errorBuilderand the half-built scope is disposed.
0.2.1 #
- No code changes in this package. Republished in lockstep with the toolchain
packages, which now accept analyzer 13 and 14 — see
cobalt_generator's changelog.
0.2.0 #
CobaltAsyncBuilder<T>: resolves withgetAsyncand builds from the result, showingloadingmeanwhile anderrorBuilder(withretry) on failure. Something already built renders without a frame ofloading. The resolution is held in state, so a parent rebuild neither restarts it nor retries a failed one by itself.context.cobaltAsync<T>().CobaltAppScopeandCobaltAppScope.buildertakeoverrides:— a function, likebootstrap, 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
cobalt0.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_lint0.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 #
CobaltNoScopeErrorandCobaltNoAppScopeErrorreplace the bareCobaltErrorthe 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 insiderunApp, shows loading and error states with retry, exposesrestart(), 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.CobaltScopeProviderandcontext.cobalt<T>(), plusCobaltScopedWidgetandCobaltScopedStatefulWidgetas bases.disposeOnExitRequestis opt-in and only meaningful on macOS and Linux, whereonExitRequestedfires and the exit is actually cancellable.