Flutter is Google’s open source UI toolkit that helps developers efficiently build beautiful multi-platform applications through a code base that supports mobile, Web, desktop and embedded platforms. Flutter is open source, free and has a loose open source license for commercial projects.

Flutter official website: Flutter

Necessary environment

  • general

    • AndroidStudio www.android-studio.org/
  • Windows

    • Git for Windows git-scm.com/download/wi…

Installation steps:

  1. Download the Flutter SDK for the corresponding system: Flutter. Dev /docs/get-st…

You can also download from the Github repository of the Flutter project, but neither is very fast.

  1. After downloading the SDK, you can decompress the Flutter SDK to any directory you want

This directory location is very important and will be used in the next step. I recommend not to go too deep. For Mac, put it under ~/, and for Windows, put it on a C or D drive

  1. ★ Set environment variables, add a star, this step is critical

Suppose you just put the Flutter SDK on disk C of MAC or Windows as I said

  • Set environment variables in macOS
Open the terminal and enter nano ~/. Bash_profile to add the following line export PATH=~/flutter/bin:$PATHCopy the code
  • Windows10 setting environment variables
Open "My Computer > Control Panel > User Accounts > User Accounts > Change my Environment Variables" under "User Variables" to check for an entry named "Path" : if this entry exists, append C:\flutter\bin, use; As a separator. If the entry does not exist, create a new user variable Path and enter C:\flutter\bin as its value. ★ Restart Windows to apply this changeCopy the code

Flutter is slow to access in China and can’t even open its official website, so let’s use a mirror site instead

Add global variables for the mirror station

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
Copy the code
  1. If the first three steps are done correctly, then we can use the command line to type the following command

flutter doctor

  1. It’s not finished yet, you will see a lot of X’s, but at least you don’t need to panic because there is a Flutter Doctor now, just look carefully at the prompt and see what is missing.

Slow. Don’t panic. It’s that slow. Be patient.

  • Finally, after completing x’s items, you will see the following screen

  • Very comfortable there!

Which editor should you use to write Code for Flutter? I prefer VS Code and install the official plugin for Flutter. There are toolbars for Code hints, debugging, and compilation

You can also play with the Flutter environment online if you don’t want to install it

dartpad.cn/flutter