didPush method Null safety

  1. @protected
  2. @mustCallSuper
TickerFuture didPush()
mustCallSuper">@mustCallSuperprotected">@protected

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

@protected
@mustCallSuper
TickerFuture didPush() {
  return TickerFuture.complete()..then<void>((void _) {
    if (navigator?.widget.requestFocus ?? false) {
      navigator!.focusScopeNode.requestFocus();
    }
  });
}