Flutter Flow: Set up your Mac for Flutter development
I’ll walk you through the steps to set up your Mac computer for Flutter development. You can install the Flutter and Dart SDK through your IDE, but you will need to install additional tools to run your Flutter project.
Prerequisites
If you are using a Silicon Mac, you will need the Rosetta Translation environment. Open your Terminal application on Mac, type the following, and press enter.
Tip: To search for an application on your Mac, use the shortcut:
command + space
sudo softwareupdate --install-rosetta --agree-to-license
Download the Flutter SDK
Use the following link to download the Flutter SDK.
macOS install
In the terminal, enter the following commands:
mkdir ~/development
cd ~/development
unzip ~/Downloads/flutter_macos_3.3.8-stable.zip
Note: The flutter version may be different depending on when you are reading this. In that case, type everything up to flutter_macos_ , then press tab to autocomplete.
Set the Flutter PATH
Setting the Flutter Path in your zsh profile will make sure it sets the path every time it loads.
Enter the following commands in your terminal:
echo 'export PATH="$PATH:~/development/flutter/bin"' >> ~/.zshrc
cat ~/.zshrc
source ~/.zshrc
The cat command is optional. It is used to show the contents of the file. Note you may not see this file when using finder because it is a hidden file (any file name that starts with a period).
Install HomeBrew
Homebrew is an application manager for Mac. You may use it to install the rest of the tools. Enter the following command to install Homebrew.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install the Android SDK
You will need the Android SDK to build Android apps. The easiest way to do this is to install Android Studio.
Download Android Studio & App Tools — Android Developers
Install Xcode
You will need Xcode to build iOS apps. You may get it from the App Store on your Mac.
Install Cocoapods
You will need Cocoapods to build iOS apps. Enter this command in the terminal.
brew install cocoapods
Install the Android SDK Manager
Flutter requires you to install the Android SDK Manager to build Android apps. Enter the following command in your terminal to set this up, but change your username below.
flutter config --android-sdk /Users/username/Library/Android/sdk
To find your username you may enter this command in the terminal:
whoami
Install Android Licenses
Enter the following command in your terminal. This is interactive, so you must agree to the licenses by typing the letter y and pressing enter.
flutter doctor --android-licenses
Install Dart
Dart is the programming language used to code Flutter applications. Enter the following commands in the terminal to install dart.
brew tap dart-lang/dart
brew install dart
Run Flutter Doctor
You can run the flutter doctor terminal command anytime you want to check if you are missing anything.
flutter doctor -v
Resources
Here are links to the documentation for the steps mentioned throughout this article.
macOS install
Homebrew
Download Android Studio & App Tools — Android Developers
Get the Dart SDK
I have created a form to better understand everyone’s needs. You can also request custom development and/or training.
https://coffeebytez.com/contact-me/