title: Navigator observer observe push event when open dialog
body: <p>In this case I want to add willpopscope to my app,and I found that sometimes it is not able to pop correctly,so I debug the code and I found observer observe push event when open dialog,I think it is strange.</p>
  
  <p>This is my observer</p>
  
  <pre><code>class MyNavigatorObserver extends NavigatorObserver {
    List&lt;Route&lt;dynamic&gt;&gt; routeStack = List();
  
    void didPush(Route&lt;dynamic&gt; route, Route&lt;dynamic&gt; previousRoute) {
      previous = previousRoute;
      current = route;
      routeStack?.add(route);
      print('didPush');
      print(routeStack.length);
      print(routeStack.sublist(0));
    }
  
    void didPop(Route&lt;dynamic&gt; route, Route&lt;dynamic&gt; previousRoute) {
      if (routeStack.length &gt; 0) {
        routeStack?.removeLast();
        print('didPop');
        print(routeStack.length);
        print(routeStack.sublist(0));
      }
    }
  
    @override
    void didRemove(Route route, Route previousRoute) {
      routeStack?.removeLast();
    }
  
    @override
    void didReplace({Route newRoute, Route oldRoute}) {
      routeStack?.removeLast();
      routeStack?.add(newRoute);
    }
  }
  </code></pre>
  
  <p>and I use it at the main class of app's page</p>
  
  <pre><code>WillPopScope(
            ...
          child: Navigator(
            observers: [MyNavigatorObserver],
            key: _navigator,
            onGenerateRoute: (RouteSettings settings) {
               ...
            }
            ...
            if (page.parentRoute != null) {
              return MaterialPageRoute(
              ...
             );
            } else {
            NaviArguments arg = settings.arguments;
             return PageRouteBuilder(
              ...
            );
         }
       },
     ),
   ),
  </code></pre>
  
  <p>and when I trigger an action to show dialog</p>
  
  <pre><code>void showProfileChildView(
    BuildContext context, {
    ProfileChildBuilder child,
    ProfileViewState state,
  }) {
    showGeneralDialog(
      context: context,
      barrierDismissible: false,
      transitionDuration: Duration(milliseconds: 150),
      pageBuilder: (BuildContext context, Animation&lt;double&gt; animation, _) {
        var scaleAnimation = Tween(
          begin: Offset(0.0, 1.0),
          end: Offset(0.0, 0.0),
        ).chain(CurveTween(curve: Curves.easeOutExpo)).animate(animation);
        return SlideTransition(
          position: scaleAnimation,
          child: ProfileChildView(
            child: child,
            profileViewState: state,
          ),
        );
      },
      useRootNavigator: false,
    );
  }
  
  </code></pre>
  
  <p>it prints out this </p>
  
  <pre><code>I/flutter (25147): didPush
  I/flutter (25147): 1
  I/flutter (25147): [_DialogRoute&lt;dynamic&gt;(RouteSettings("null", null), animation: AnimationController#48fc4(▶ 0.000; for _DialogRoute&lt;dynamic&gt;))]
  </code></pre>
  
  <p>In other cases when I trigger other dialog(not full-page) it won't trigger the push event
  Is it because one is full-page one is not full-page?
  can someone tell me why?</p>