Flutter-通过导航器pushNamed()打开弹出窗口或bottomSheet

时间:2019-11-30 12:18:18

标签: flutter

我试图通过路线打开bottomSheet。 有没有机会通过Navigator.pushNamed(..)来对抗bottomSheet或弹出窗口?

onGenerateRoute: (RouteSettings settings) {


      if(!_user.isLoggedIn()){
      //HERE I NEED SHOW BOTTOM SHEET 
      }         

      switch (settings.name) {

        //* HOME ---------------------------------------------
        case Routes.home:
          return SimplePageRoute(
            builder: (context) => HomeScreen(),
            settings: RouteSettings(name: Routes.home),
          );
          break;

        //another routes...

      }
    },

0 个答案:

没有答案