Flutter Part 1: Install
esther
Make sure that you unzip the flutter folder into the right directory.
If you’d like to move the flutter folder after ran flutter, you might see the same error as mine. 🙈
Install (macOS)
- Download Flutter SDK and unzip
Add path to
.zshrc
export PATH="$PATH:[PATH_OF_DIRECTORY]/flutter/bin"
Pre-download tools
flutter precache
iOS
Install xcode
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer sudo xcodebuild -runFirstLaunch
Set up Simulator
open -a Simulator
Create a flutter project and test with the device
flutter run
android
- Download and install Android Studio
- Create a Virtual Device (Android Studio > Tools > AVD Manager)
Run with the device
flutter run
Errors
After moved flutter folder, you might see the error below:
Warning! This package referenced a Flutter repository via the .packages file that is no longer available. The repository from which the ‘flutter’ tool is currently executing will be used instead.
- Update path in
.zshrc
- Add
.packages
into.gitignore
Recreate
.packages
flutter packages get