delegatedTransition property

DelegatedTransitionBuilder? get delegatedTransition

The DelegatedTransitionBuilder provided to the route below this one in the navigation stack.

Used for the purposes of coordinating transitions between two routes with different route transitions. When a route is added to the stack, the original topmost route will look for this transition, and if available, it will use the delegatedTransition from the incoming transition to animate off the screen.

If the return of the DelegatedTransitionBuilder is null, then by default the original transition of the routes will be used. This is useful if a route can conditionally provide a transition based on the BuildContext.

The ModalRoute receiving this transition will set it to their receivedTransition property.

This sample shows an app that uses three different page transitions, a Material Zoom transition, the standard Cupertino sliding transition, and a custom vertical transition. All of the page routes are able to inform the previous page how to transition off the screen to sync with the new page.
link

To create a local project with this code sample, run:
flutter create --sample=widgets.ModalRoute.delegatedTransition.1 mysample

This sample shows an app that uses the same transitions as the previous sample, this time in a MaterialApp.router.
link

To create a local project with this code sample, run:
flutter create --sample=widgets.ModalRoute.delegatedTransition.2 mysample

Implementation

DelegatedTransitionBuilder? get delegatedTransition => null;