Flutter Setup

Table of contents
  1. Installation
    1. Xcode
    2. Android Studio / Android SDK
    3. CocoaPods

Installation

If you’re using Apple Sillicon Mac, first install Rosetta.

Install Flutter via Homebrew:

brew install --cask flutter

Run the following command to see the components installed or missing:

flutter doctor  # -v for verbose

You can opt out of analytics and crash reporting by running flutter config --no-analytics.

Xcode

Install Xcode from the App Store.

Then, run the following commands to configure Xcode command-line tools:

sudo xcode-select --install
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
sudo xcodebuild -license

Android Studio / Android SDK

Install Android Studio via Homebrew:

brew install --cask android-studio

If not already, install Android SDK via Android Studio:

Android SDK Manager

And Android SDK Command-line Tools:

Android SDK Command-line Tools

Accept Android SDK licenses:

flutter doctor --android-licenses

CocoaPods

To use Flutter plugins with native iOS code, you need to install CocoaPods:

brew install cocoapods

References: