canDriveSecondaryTransitionForPreviousRoute method

  1. @override
bool canDriveSecondaryTransitionForPreviousRoute(
  1. Route previousRoute
)
override

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:

Implementation

@override
bool canDriveSecondaryTransitionForPreviousRoute(
    Route<dynamic> previousRoute) {
  return previousRoute is! CupertinoSheetRoute;
}