canDriveSecondaryTransitionForPreviousRoute method
Returns true if the previousRoute
bottom route should delegate the
secondaryAnimation
transition when this route is pushed on top of it
or when then this route is popped off of it.
Subclasses can override this method to restrict the set of routes they need to coordinate transitions with.
If true, and previousRoute.canTransitionTo()
is true, then the route
previousRoute
will delegate its secondaryAnimation
transition to
this route's buildSecondaryTransitionForPreviousRoute method
If false, previousRoute
's secondaryAnimation
transition will be
handled by default by buildTransitions
Returns false by default.
See also:
-
canTransitionTo, which must be true for
previousRoute
for the buildSecondaryTransitionForPreviousRoutesecondaryAnimation
to run. -
buildSecondaryTransitionForPreviousRoute, to define
previousRoute
'ssecondaryAnimation
transition when this is true
Implementation
@override
bool canDriveSecondaryTransitionForPreviousRoute(
Route<dynamic> previousRoute) {
return previousRoute is! CupertinoSheetRoute;
}