Mac Setup
Flutter Setup
Check this video
Ideal way
- Ideal way is to refer the official documentation and do the setup with the modifications you want
- https://docs.flutter.dev/get-started/install/macos
Alternative
Important
If you’re installing on an Apple Silicon Mac, you must have the Rosetta translation environment available for some ancillary tools. You can install this manually by running:sudo softwareupdate --install-rosetta --agree-to-license
Step 1
- Open Terminal
- Change directory to home
- In the terminal type below command and press return/enter.
cd ~
Step 2
- You can also use git directly instead of downloading the prepared archive. For example, to download the stable branch:
git clone https://github.com/flutter/flutter.git -b stable
Step 3
- Add/Update your path, and run
flutter doctor
. That will let you know if there are other dependencies you need to install to use Flutter (e.g. the Android SDK).
Add/Update Flutter Path
- Determine the path of your clone of the Flutter SDK. You need this in Step 3.
- We installed flutter in
~/flutter
location, in the step one. - So to check the whole path, open the terminal and run below commands.
cd ~/flutter
pwd
- This will give you result similar to
/Users/$USER/flutter
- We installed flutter in
- Open (or create) the rc file for your shell.
- Check this section.
- Add the following line, save the rc file.
export PATH="$PATH:/Users/$USER/flutter/bin"
- Close the terminal entirely and open it again.