How quickly and effectively installed flutter document on mac

How to install flutter

installation steps

  • Download the flutter of sdk
  • Unzip the download is complete (after unzip the file into the folder directory application)
  • Using the command line (opened with editor) code ~/ .bash_profile(Environment Configuration)
  • Add a row after opening the file export PATH = $PATH:/Applications/flutter/bin
  • Then execute the command linesource ~/.bash_profile
  • Run flutter --helpDescription occurs if flitter, indicating flutter has been successfully installed!

Download other configuration environment

  • You can download an Apple Store xcodeSoftware
  • May xcodeopen Simulator
  • Then in vscodethe prompt input flutter doctoryou will be prompted to have a device available
  • Editor can be used vscodeor a android studio(temporary use VSCode)
  • In the vscodeinstallation flutterof the plug-in
  • Open a command panel: The search flutterwill prompt some of flutter-related commands
  • You can use the command-line tool flutter doctorto detect the problem (to solve some of the problems)

Command line to create a project

  • flutter create appNote (Project name can not only use horizontal lines underscore)
  • Enter the created directory
  • Use vscodeOpen Directory
  • Use the command in the terminal git initinitialization warehouse
  • Do a Save and submitgit add . git commit -m'初始化'

Create a flutter in the project in vscode

  • Control + shift + pIn search flutterof aNew project

Running the Project

  • Before running the project, can be used flutter doctorto detect the next project
  • Use the command flutter emulatorcan list items that can be used in the simulator
  • Find a simulator, and the complex its name: asapple_ios_simulator
  • Excuting an orderflutter emulator --launch apple_ios_simulator
  • After opening the simulator, we can execute the application of a flutter, use the commandflutter run
  • Of course, if the system provides multiple simulators, we can chooseflutter -d
  • R may be used in thermal loading
  • Ctrl + c interrupt the running!

How to install Android studio plug-in

  • Open android studio, and then open the project folder
  • You will be prompted to install the plug-in, follow the prompts to install (dependent)
  • Installed, restart simulator (Android studio)
  • After opening, configure the emulator (open tools -> AVD Manager)
  • Selecting the type and model of the specific device simulation, the API specific selection, the Graphics: Hardware-GLES2.0 selected in (finish).
  • Open the editor of the debugging function, the compiler is run, this time we will choose a device (we can choose to create good equipment)

Guess you like

Origin www.cnblogs.com/yaogengzhu/p/11318198.html