async_transition_boundary 0.1.0
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 #
TransitionBoundarywidget that brings ReactuseTransition-style transitions toasync_zone: while a transition is in flight, the previously committed subtree stays on screen instead of flashing the surroundingAsyncZonefallback.TransitionZone.of(context)/TransitionZone.maybeOf(context)for resolving the nearest enclosing boundary'sTransitionZoneScopefrom any descendant build context, with the context auto-subscribed so it rebuilds whenisPendingflips.TransitionZoneScope.startTransition(action)runsactionsynchronously so state changes apply on the very next build, then keeps the transition pending until everyFuturethrown by descendantZoneWidgets resolves.startTransitionautomatically tracksFuture-returning (async) actions, so transitions stay pending across explicit async work such ascompute()without requiring a descendantZoneWidgetto suspend.TransitionZoneScope.isPendingflag that descendants can subscribe to in order to dim, label, or disable the in-flight subtree.forceSameFrameRebuildopt-in onTransitionBoundarythat force-rebuilds dirty descendants synchronously soisPendingcan 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
TransitionZoneBridgecollaboration withasync_zone, auto-tracked async actions, andforceSameFrameRebuildtrade-offs.