GetTransitionDelegate<T> class
A TransitionDelegate that resolves page-list changes like the framework's DefaultTransitionDelegate, except while isPopNavigation reports that the change being applied was caused by a back navigation.
A pop through GetX's router delegate (GetDelegate.back,
GetDelegate.popRoute, the browser back button, ...) mutates the
declarative page list. When the revealed page was already in the previous
list the navigator performs a genuine removal and the default delegate
correctly plays the leaving route's pop animation. But when the pop
surfaces as a replacement — the incoming page was not in the previous
list, which is the norm for nested GetRouterOutlet stacks that render
only the current tree branch — the default delegate marks the incoming
page for push (a forward animation) and completes the leaving route
without any animation (#1883).
While isPopNavigation returns true this delegate instead:
- enters new pages in place, without a forward animation (RouteTransitionRecord.markForAdd);
- pops the top-most exiting route with its reverse transition (RouteTransitionRecord.markForPop) — unless pageless routes (dialogs, sheets) sit on top of it, mirroring the default delegate;
- completes every other exiting route without animation; and
- keeps the exiting routes above the entering ones in the resulting history, so the pop animation plays on top of the revealed page.
When isPopNavigation returns false the resolution is byte-for-byte
the DefaultTransitionDelegate's.
- Inheritance
-
- Object
- TransitionDelegate<
T> - GetTransitionDelegate
Constructors
- GetTransitionDelegate({})
-
Creates a transition delegate that applies pop semantics whenever
isPopNavigationreturnstrueat resolve time.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
Whether the page-list change being resolved was caused by a back
navigation. Read live from the router delegate at resolve time.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
{required List< RouteTransitionRecord> newPageRouteHistory, required Map<RouteTransitionRecord?, RouteTransitionRecord> locationToExitingPageRoute, required Map<RouteTransitionRecord?, List< pageRouteToPagelessRoutes}) → Iterable<RouteTransitionRecord> >RouteTransitionRecord> -
A method that will be called by the Navigator to decide how routes
transition in or out of the screen when Navigator.pages is updated.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited