IOS developers taught themselves the history of Flutter

I develop for iOS, using the Mac development environment, the following is for self-study records, not for other purposes

See the website Flutter Chinese

First download the SDK download address

1. Download the zip file and decompress it to the desired installation directory

CD ~ / development unzip ~ / Downloads/flutter_macos_v0. 5.1 beta. ZipCopy the code

2. Configure environment variables (domestic mirror address).

1. First open the terminal. CD Go to the SDK directory and run vim ~/. Bash_profile to add the following address export PUB_HOSTED_URL=https://pub.flutter-io.cn // Set export for domestic users FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn // You need to set export PATH= your SDK address /flutter/bin:$PATH 2. Save exit and execute flutter doctorCopy the code

This will tell you if the configuration is successful. For my Mac, Xcode and some BREW and POD environments are already installed because I did iOS development. The result after execution is

✓] Flutter (Channel stable, v1.17.3, on Mac OS X 10.14.6 18G84, ✓ Go onto those who qualify. Locale zh-Hans-cn) [Qualify] Android toolchain - Develop for Android devices eligible Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, Set ANDROID_SDK_ROOT to that location. You may also want to add it to your PATH environment variable. [✓] Xcode - Develop for iOS and macOS (Xcode 11.3.1) [!] Android Studio (not installed) [✓] VS Code (Version 1.46.1) [✓] Connected device (1 available)Copy the code

I have iOS development environment and VScode development tools. (which android temporarily not considered, after learning in the installation environment package), lack of what environment can go to Baidu self-study search

3. Open VS Code

After opening vscode, first add the dart and flutter plug-ins in the extension on the left, and then in the terminal below

The flutter create first_app can select a directory that does not have to be in the same directory as the SDKCopy the code

Once created, open the project, then open the iOS emulator and execute

flutter run
Copy the code

Ready to run the project!

The following is a collection of problems encountered in my development