async_transition_boundary 0.1.0 copy "async_transition_boundary: ^0.1.0" to clipboard
async_transition_boundary: ^0.1.0 copied to clipboard

React-style transition boundary for async_zone. Keep previous content visible while a new async state is being prepared, instead of showing a fallback.

0.1.0 #

Initial release.

Features #

  • TransitionBoundary widget that brings React useTransition-style transitions to async_zone: while a transition is in flight, the previously committed subtree stays on screen instead of flashing the surrounding AsyncZone fallback.
  • TransitionZone.of(context) / TransitionZone.maybeOf(context) for resolving the nearest enclosing boundary's TransitionZoneScope from any descendant build context, with the context auto-subscribed so it rebuilds when isPending flips.
  • TransitionZoneScope.startTransition(action) runs action synchronously so state changes apply on the very next build, then keeps the transition pending until every Future thrown by descendant ZoneWidgets resolves.
  • startTransition automatically tracks Future-returning (async) actions, so transitions stay pending across explicit async work such as compute() without requiring a descendant ZoneWidget to suspend.
  • TransitionZoneScope.isPending flag that descendants can subscribe to in order to dim, label, or disable the in-flight subtree.
  • forceSameFrameRebuild opt-in on TransitionBoundary that force-rebuilds dirty descendants synchronously so isPending can flip in the same frame the transition starts, rather than one frame later via a post-frame callback.

Documentation #

  • Bilingual README (English / Japanese) covering boundary placement, the TransitionZoneBridge collaboration with async_zone, auto-tracked async actions, and forceSameFrameRebuild trade-offs.
0
likes
160
points
76
downloads

Documentation

API reference

Publisher

verified publisherkyoheig3.jp

Weekly Downloads

React-style transition boundary for async_zone. Keep previous content visible while a new async state is being prepared, instead of showing a fallback.

Repository (GitHub)
View/report issues

Topics

#suspense #transition #async #react #flutter

License

BSD-3-Clause (license)

Dependencies

async_zone, flutter

More

Packages that depend on async_transition_boundary