跳转至

Flutter Commands

Bash
1
2
3
4
5
flutter --version
flutter upgrade

# check the installation and environment
flutter doctor
Bash
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# create a new project
flutter create <project_name>

# list connected devices
flutter devices

# run for Chrome
flutter run -d chrome
# run for Mac
flutter run -d mac
# run for iPad Simulator
open -a simulator
flutter run -d ipad
# run for iPad
flutter run -d 杨希杰

# run using release mode
flutter run --release

# build an app (subcommands: apk macos web)
flutter build <subcommand>
flutter build <subcommand> --release

# clean current project
flutter clean