📜  材料应用程序路线 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:34.910000             🧑  作者: Mango

代码示例1
///////////////////////////////////////
// Setting up routes on material app //
///////////////////////////////////////

MaterialApp(
  // Start the app with the "/" named route. In this case, the app starts
  // on the FirstScreen widget.
  initialRoute: '/',
  routes: {
    // When navigating to the "/" route, build the FirstScreen widget.
    '/': (context) => FirstScreen(),
    // When navigating to the "/second" route, build the SecondScreen widget.
    '/second': (context) => SecondScreen(),
  },
);