Flutter入门 - 路由

 routes: {
          '/about': (BuildContext context) => Page(),
        },

FlatButton(
            child:  Text("about"),
            onPressed: () => {
            Navigator.pushNamed(context, "/about")
            },

floatingActionButton: FloatingActionButton(
        child: Icon(Icons.ac_unit),
        onPressed: () => {
          Navigator.pop(context)
        },
      ),

你可能感兴趣的:(Flutter入门 - 路由)