alibaba / fish-redux

An assembled flutter application framework.
https://github.com/alibaba/fish-redux
Apache License 2.0
7.33k stars 843 forks source link

NavigatorObserver didpop执行的时候,怎么用dispatch执行一个action? #705

Open koalababy2024 opened 4 years ago

koalababy2024 commented 4 years ago
class CusomObserver extends NavigatorObserver{

  @override
  void didPop(Route<dynamic> route, Route<dynamic> previousRoute) {
    print("*****************");
    print(route);
    print("*****************");
    print(route.navigator.context);
    print("*****************");
    print(route.settings.name);

    if ("vehicle_manager" == route.settings.name){
      PageRoutes pageRoutes = routes as PageRoutes;

      Page page = pageRoutes.pages[route.settings.name];
      page as VehicleManagerPage   //这里想要获取到了具体的page

    }

    print("*****************");
  }
}

怎么执行这个page内effect中的一个action呢?