In this tutorial, we will tell you how about the structure of our code.
First, We should create app to contain our pages.
voidmain() =>runApp(FlutterOpenApp());classFlutterOpenAppextendsStatelessWidget {// This widget is the root of your application.@overrideWidgetbuild(BuildContext context) {returnMaterialApp( title:FLUTTER_OPEN, theme:ThemeData(primaryColor:BLUE_DEEP), home:HomePage(),//this is our home page. routes: {PageName.CONTAINER: (context) =>ContainerPage(),//this is our choose content//other widgets pages will be put in here. Now I just put one as above. }, ); }}
Then, I create a home page to show all widgets that we can choose to jump to.