Quickstart Setup of Flutter on macOS
Flutter is an exciting new UI SDK created by Google. With Flutter you can create an app for both Android and iOS from a single codebase. In this post, I’ll walkthrough the setup process for getting started on macOS.
Downloading the Flutter SDK
Clone the latest stable release of the Flutter SDK to a directory on your local machine:
Adding the Flutter SDK to your PATH
For most developers who use macOS, /usr/local/bin/
is already in your PATH
variable. As a result, we can create a symbolic link to our flutter directory. For example:
Alternatively, you can elect to clone the latest stable release of the Flutter SDK directly to your /usr/local/bin/
in the previous step.
Run flutter doctor
You are now ready to run the Flutter CLI commands! There’s a convenient built-in CLI command called flutter doctor
that will check to ensure you have all the required dependencies. Run:
The output of the command will inform you on the next tasks you need to perform. For example:
iOS Simulator Setup
Install the latest stable version of Xcode from the macOS App Store. You can then install and configure the Xcode command-line tools by running the following CLI commands:
One additional item to check is if the Xcode license agreement has been accepted. You can verify this by launching Xcode after you have installed it or running the following CLI command:
With Xcode now installed, you can utlize the iOS Simulator. You can either launch it from Spotlight by typing in “Simulator” or from the CLI:
Android Emulator Setup
Install the latest stable version of Android Studio, either through homebrew or from the Android Developer website. Launch Android Studio and go through the Android Studio Setup Wizard. This installs the latest Android SDK, Android SDK CLI Tools, and Android SDK build tools, which are required by Flutter when developing for Android.
Once that has completed, in Android Studio navigate to Tools > Android > AVD Manager and select Create Virtual Device. From here, you can select a device specification. For improved emulator performance select Hardware - GLES 2.0 before finishing the AVD configuration. Now in the Android Virtual Device Manager, click Run in the toolbar to launch your emulator.