Alright so let's begin assuming you created the project and can currently run the hello world app, first thing to do is remove all the boilerplate and keep only the main method.
After this, you need to create the "Application" widget. In order to do that create a new folder under src and create a new file called "application.dart"
So all of this is straightforward. The next step is to define our routes.
Adding linters, Adding Dependency
On the main project folder go to pubspec.yaml
pubspec.yaml is used to maintain dependencies on the flutter project.
Once you added the package run the following command to install the package in your project.
Once install the package make sure to restart the project. Because the flutter hot-reload can't access the package unless it restarts.
Before heading off to explain the project details let's take a step back and discuss about the project structure we are going to follow.
So basically folders are going to be grouped based on the feature under src as you can see from the image above.
Apart from the feature, there is an application folder for putting the main app or the root widget, there is also a di folder for dependency injection and finally the router folder for putting all our page routes.
Let's take a closer look at the product feature for instance.
So each of the folders represent a layer of the feature to be coded. If the names don't make sense we will cover them later don't worry.