
Set up a Flutter development environment
Building a Flutter development environment on MacOS
1. Install Xcode
Download and install the Xcode command line tools from the App Store.
2. Install Flutter
download and install the Flutter SDK from the Flutter SDK download page.
3. Add Flutter to your PATH
Add the Flutter binary directory to your PATH environment variable.
# ~/.zshrc
export PATH="$PATH:$HOME/flutter/bin"
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
after checking the path.
flutter doctor
4. Configure the VS Code
install the Flutter and Dart extensions in VS Code.
- Dart
- Flutter
5. Create a new Flutter project
flutter create my_app
click run button and choise “Flutter” to run the project.