Create project
There are many ways to create a Flutter project, and each IDE tool also integrates shortcut operations for creating a Flutter project. We list three ways here: create using the command line, create using Android Studio, and create using VSCode.
A video tutorial is attached at the end of the article
- Create using the command line
After Flutter is installed, we have already configured the command line tool. The command line tool is very powerful and can meet all the operations of our daily development of Flutter (if you have not installed the Flutter environment, you can refer to here to install ).
We just need to open the command line tool and enter:flutter create flutter_app
Which
flutter_app
is the name of our project. - Use Android Studio to create.
We open Android Studio and clickFile
->New
-> in the upper left cornerNew Flutter Project
. - Create with VSCode
Click the button above VSCodeView
->Command Palette..
and enter the keyword in the pop-up input boxflutter
to create the project.
Run the counter project using Android Studio
Open the project we just created with Android Studio. flutter_app
After opening, we first select the emulator, and then just click to run it.
Use VSCode to run the counter project
Open the project with VSCode flutter_app
, find the directory under the main.dart
file open
and click the Run button in the upper right corner on it.