In this tutorial, we will tell you how about the structure of our code.
First, We should create app to contain our pages.
void main() => runApp(FlutterOpenApp());
class FlutterOpenApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
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.