Before creating project on flutter, You must have installed following:
- Flutter (latest version)
- Android SDK
- JDK
- Microsoft Visual Studio
And all the path must be set correctly in environment variables.
-
Create a folder in your pc.
-
Open Cmd
-
type -> flutter create app_name
-
After following the above command you will get:
In order to run your application, type:
$ cd app_name
$ flutter run -
After running the above command, You will get options to choose device where you want to run your app.
You will see the below text:
Multiple devices found:
Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.2486]
Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.65
Edge (web) • edge • web-javascript • Microsoft Edge 111.0.1661.44
[1]: Windows (windows)
[2]: Chrome (chrome)
[3]: Edge (edge)
Please choose one (To quit, press "q/Q"): -
Once you choose any option, it will take some moment to start your app.
-
In VS Code, Go to View -> Command Palette.
-
Search "Flutter:New Project"
-
Choose a Flutter Template: "Application - Generate a flutter application with descriptive comments and texts".
-
Now, choose a folder where you want to create your app.
-
After that, Enter a name for your new project.
-
Your new flutter app will be created.
-
After following the above command you will get:
In order to run your application, type:
$ cd app_name
$ flutter runAfter running the above command, You will get options to choose device where you want to run your app.
You will see the below text:
Multiple devices found:
Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.2486]
Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.65
Edge (web) • edge • web-javascript • Microsoft Edge 111.0.1661.44
[1]: Windows (windows)
[2]: Chrome (chrome)
[3]: Edge (edge)
Please choose one (To quit, press "q/Q"): -
Once you choose any option, it will take some moment to start your app.