Download the Flutter SDK

  1. Download the Flutter website
  2. Unpack the downloaded Flutter SDK and drag the Flutter directory into the application

Configuration Flutter SDK

  1. To access the MAC terminal, run the vim ~/. Bash_profile command without using the CD to switch to a path
  2. An I
  3. Paste the following code to add the image to the environment variable.
export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn export PATH= The newly downloaded outer PATH of the flutter folder /flutter/bin:$PATHCopy the code

Take my native path as an example

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=/Applications/flutter/bin:$PATH
Copy the code
  1. Press Esc to exit and then :wq to enter and exit.
  2. Execute the code source ~/.bash_profile
  3. In this case, run the flutter command to check whether the flutter –version is configured successfully
  4. Run the Flutter Doctor to check the flutter environment. This step is to change all ❌ to ✅ based on the check result.

Configure the mirror

Again, edit the ~/.bash_profile file

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter
Copy the code

Note: this image is temporary and is not guaranteed to be available at all times. Please refer to the image server for more information. address

Configuring the iOS Environment

Install Xcode

Configuring the Android Environment

  1. Install the Android Studio address
  2. Then the next steps will help us install the SDK and other relevant content we need to use
  3. Create the Android emulator AVD Manager

detection

flutter doctor

  1. Android Studio needs to search for and download Flutter and Dart in Configure -> Plugins
  2. VS Code needs to search for and download the plugin Flutter

Run to the real machine and emulator

Running Gradle task ‘assembleDebug’…

Ali Cloud Mirror

maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
Copy the code

Refer to the link

1. Coderwhy Flutter environment set up 2. Introduction to Flutter | peak (a) (Mac) 3. Download the Android Studio and the SDK tools

Learning materials recommended by “Star Y”

  1. Dart language learning
  2. The Flutter section, Wendux (Dio author) on flutter Practice
  3. Practical combat a project, you can find some project source code while reading and writing
  4. When learning Flutter, avoid looking for the source code of a project that is too mature. Start with a simple start.