[Flutter 1-5] The first project to run Flutter-counter

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_appis the name of our project.

  • Use Android Studio to create.
    We open Android Studio and click File-> New-> in the upper left corner New Flutter Project.
    2020_10_25_android_create
  • Create with VSCode
    Click the button above VSCode View-> Command Palette..
    2020_10_25_vscode_view.png
    and enter the keyword in the pop-up input box flutterto create the project.
    2020_10_25_vscode_flutter

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.
2020_10_25_android_select_device

Use VSCode to run the counter project

Open the project with VSCode flutter_app, find the directory under the main.dartfile open
2020_10_25_vscode_main_dart
and click the Run button in the upper right corner on it.
2020_10_25_vscode_run

Video tutorial

the public

Guess you like

Origin blog.51cto.com/13824996/2546050