didPush method
override
Called after install when the route is pushed onto the navigator.
The returned value resolves when the push transition is complete.
The didAdd method will be called instead of didPush when the route immediately appears on screen without any push transition.
The didChangeNext and didChangePrevious methods are typically called immediately after this method is called.
Implementation
@override
TickerFuture didPush() {
WidgetsBinding.instance.addObserver(_backObserver);
final NavigatorState nav = navigator!;
final MorphFlight flight = .launch(
nav.context,
from: from,
target: target,
builder: builder,
motion: motion,
barrierDismissible: _barrierDismissible,
maxScrimOpacity: maxScrimOpacity,
scrimColor: scrimColor,
shadowColor: shadowColor,
semanticLabel: semanticLabel,
routeMode: true,
overlay: nav.overlay,
// Pre-latch the scrim belongs to the shuttle: its dismiss taps
// route through the Navigator so the route lifecycle stays the
// single source of truth.
onDismissRequested: _handleDismissRequest,
);
_flight = flight;
flight.controller.addListener(_onFlightTick);
return super.didPush();
}