Install Flutter On MacOS With M1 Chip - LinkedIn
Agree & Join LinkedIn
By clicking Continue to join or sign in, you agree to LinkedIn’s User Agreement, Privacy Policy, and Cookie Policy.
Sign in to view more content
Create your free account or sign in to continue your search
Sign inWelcome back
Email or phone Password Show Forgot password? Sign inor
By clicking Continue to join or sign in, you agree to LinkedIn’s User Agreement, Privacy Policy, and Cookie Policy.
New to LinkedIn? Join now
or
New to LinkedIn? Join now
By clicking Continue to join or sign in, you agree to LinkedIn’s User Agreement, Privacy Policy, and Cookie Policy.
Skip to main content 8 min readThere are many tutorials how to install Flutter on a Mac with the M1 chip. The added-value of this step-by-step tutorial is that (1) all steps have been tested on a clean install and (2) the reason of each step is explained along with its role in the big picture. It helps debugging of installation and development errors, and makes easier the transition to free hands-on Flutter programming courses such as this –highly recommended– book Flutter Apprentice (https://www.raywenderlich.com/books/flutter-apprentice/v2.0).
Update of September 19, 2022: The updated version for Flutter 3.3 is here: https://www.raywenderlich.com/books/flutter-apprentice. Kudos and thanks to the Ray Wenderlich team.
To install Flutter on other platforms, I recommend the e-book https://www.wowebook.org/flutter-recipes/
TLDR (Too Long Didn’t Read)
This tutorial contains explanations to better understand the purpose of each step. It also has work-arounds to address the imperfect state of the tools, at the date of April 2022. We will install successively each of the coloured boxes that compose the Flutter development environment shown in the Title image. Let's see what each box covers.
Installing Flutter on macOS
General considerations
I'm a fan of Visual Studio Code. I use it for blockchain, React and general-purpose development. There are excellent Flutter plugins for VSCode, so you may want to keep using VSCode to develop with Flutter. However, I'd recommend that an average programmer who has no Flutter experience rather uses Android Studio for Flutter development. Android Studio user interface is very similar to VSCode.
The reason is that Flutter evolves very fast to keep up with Apple's changes and Android Studio does a better job keeping its Flutter SDK up to date. If you use VSCode, whenever you experience a bug there is always a possibility that your Android SDK is not up to date.
In a similar reasoning, most developers are tempted to use directly command line instructions to solve an issue during Flutter installation and execution. However, it is wiser to look for a solution first in Android Studio menu items because they invoke the Flutter commands more thoroughly than does the average programmer. The whole construction involving Android and Xcode is complex, if you miss a command line option here, there are chances that you mess up the whole system and have to reinstall from scratch.
Installation plan
Although each IDE (Android Studio, Flutter SDK, Xcode) is a world by itself, if you follow the logical order of installation, each component will be nicely aware of the previous ones. The order we will follow is:
Refer to the Title illustration blocks and observe that the logic of this sequence maps the relations between the blocks.
We'll do the installation on a clean MacBook Pro with M1 Pro chip, on macOS 12.3.1 that is the latest one available in March-April 2022.
Option: install macOS anew on a separate volume
If you prefer (like me) to boot from a separate development volume than your usual office system, there is a very elegant solution to this need, starting from macOS High Sierra. With the APFS file system, you can create on the same partition a distinct boot volume that will be sized dynamically on demand. This is what I'm doing to test this clean install.
Option: install Chrome or Brave
For pure Flutter development, any browser can do the job but if you want to add blockchain functions to your mobile, be aware that most cryptos wallets do not support Safari's local browser storage. Mozilla Firefox does, but it hogs memory and CPU even when not active. This is why most developers prefer using Chrome or Brave. They have also better debugging tools.
Option: show hidden files and folders
As developer, we need access to hidden system files. In the Finder, type Command + Shift [dot] to show hidden files.
Also, make the Finder show the Library folder by the menu View > Show View Options… and check the box Show Library Folder.
Install Homebrew and preparation tools
Install Homebrew
Homebrew is a set of scripts written in Ruby on Rails language. The reasons you may want to install Homebrew are:
Recommended by LinkedIn
There is a comprehensive guide to install Homebrew: https://mac.install.guide/homebrew/index.html.
To install Homebrew on macOS,
Note that we use the shell `bash` instead of `zsh` because this installation script is written for `bash`.
The first command adds a shell command in the profile of the shell zsh used in Terminal. The second command actually executes this shell command to apply it to the current executing Terminal. The script `shellenv` adds this installation of Homebrew to our `PATH`, `MANPATH`, and `INFOPATH`.
After installation, check the tools installed along, using the shell command `brew config`. It takes some time because Xcode Command Line Tools library needs to be verified. We observe that our config is indeed based on a 10-core ARM64 and that the CLT were installed.
Development Note: It is good practice to always check your development environment after upgrading macOS. Check that Xcode, Android SDK, Flutter are correct. These critical components may need being reinstalled after any macOS upgrade to work. Most often, at least the Command Line Tools for Xcode needs it.
Install Ruby using Homebrew
We anticipate here quirk in the Apple environment: it is not recommended in general to use for development the Ruby that is bundled with macOS: https://www.freecodecamp.org/news/do-not-use-mac-system-ruby-do-this-instead/
Another compelling reason not to use the Apple-bundled Ruby to install CocoaPods: the bundled Ruby for M1 Mac has been compiled with Intel X86_64. Therefore, this ARM64 Ruby calls by mistake the X86_64 version of the package ffi (Foreign Functions Interface) and throws an exception. See more detailed explanations here: https://kvutien-yes.medium.com/a-surprise-when-moving-to-a-mac-m1-1b6033d93c48.
The steps to prepare Ruby for installing correctly CocoaPods are:
Check that the Ruby we use is compiled for ARM64. For this, use the macOS editor `nano` to create the following file rubyM1.rb and store it on Desktop (`nano ~/Desktop/rubyM1.rb`):
require 'rbconfig' OSVERSION = RbConfig::CONFIG['host_os'] ARCH = RbConfig::CONFIG['arch'] HOSTCPU = RbConfig::CONFIG['host_cpu'] BUILDCPU = RbConfig::CONFIG['build_cpu'] TARGETCPU = RbConfig::CONFIG['target_cpu'] puts "OS: #{OSVERSION}" puts "Arch: #{ARCH}" puts "Host CPU: #{HOSTCPU}" puts "Build CPU: #{BUILDCPU}" puts "Target CPU: #{TARGETCPU}"Quit `nano` with control-X, saving the file. Execute the file :
kvutien@MBP21VTK ~ % ruby Desktop/rubyM1.rb OS: darwin21 Arch: arm64-darwin21 Host CPU: arm64 Build CPU: aarch64 Target CPU: arm64The last 5 lines are the output, showing that our Ruby has been compiled for the correct architecture ARM64.
Install `tree` using Homebrew
With Homebrew installed, it is handy to use it to install `tree`, that we'll use very frequently to list recursively the content of a folder.
kvutien@MBP21VTK ~ % brew install treeOnce done, we display for illustration the content of the folder `homebrew`, limited to 1 level of hierarchy:
kvutien@MBP21VTK ~ % tree /opt/homebrew -L 1Next steps
See Part 2 (install Android Studio and Xcode) and Part 3 (install Flutter) of this tutorial.
Like Like Celebrate Support Love Insightful Funny Comment- Copy
- X
- Report this comment
Excelent article!!!! Congratulations!
Like Reply 1 Reaction 2 Reactions- Report this comment
Your article helped me to setup flutter without any problem. Very informative, simple and clean article Thank you very very much 😃😃
Like Reply 2 Reactions 3 Reactions- Report this comment
Thank you very much Khang Vu Tien, this blog has helped me setup my MacBook Pro with M1 chip, I have been struggling to setup my development environment for long till I came I cross these instructions. This is a must Bookmark because I will need them for future reference. 😀
Like Reply 1 Reaction 2 Reactions See more commentsTo view or add a comment, sign in
More articles by Khang Vu Tien
- Explanations of the DeepSeek R1 Technical Paper
Jan 26, 2025
Explanations of the DeepSeek R1 Technical Paper
(January 2025) The new #AI model #Deepseek R1 has raised a lot of interest… and a lot of BS 🙃. Here is the explanation…
26 Comments
- Reading Notes of ElizaOS
Jan 24, 2025
Reading Notes of ElizaOS
(Jan 2025) 0-Executive Summary This document contains short working notes when studying the AI Agent creation framework…
- Inclusive Finance – Machu Picchu Project
Sep 30, 2024
Inclusive Finance – Machu Picchu Project
Executive Summary Machu Picchu is a project focused on leveraging 21st-century technologies to improve the livelihoods…
3 Comments
- How AI can help humanitarian assistance?
Jun 24, 2024
How AI can help humanitarian assistance?
Calculate closeness between profiles of persons in need. Since 2022, AI-powered chatbots have become very popular.
- What is Artificial Intelligence?
May 1, 2024
What is Artificial Intelligence?
This is an attempt to explain Artificial Intelligence (commonly called “AI”) in the broad sense. I should point out…
5 Comments
- Qu'est-ce que l'Intelligence artificielle ?
May 1, 2024
Qu'est-ce que l'Intelligence artificielle ?
Ceci est une proposition pour appréhender au sens large l'Intelligence artificielle (appelée couramment "IA"). Je…
3 Comments
- No code-no maths: Learn Gen AI (2)
Feb 14, 2024
No code-no maths: Learn Gen AI (2)
Ever wonder how chatbots work? You know, those virtual assistants always ready to answer your questions? Let's dive in…
1 Comment
- No code-no maths: Learn Gen AI
Feb 14, 2024
No code-no maths: Learn Gen AI
`Ever wonder how chatbots work? You know, those virtual assistants always ready to answer your questions? With a…
6 Comments
- Inclusive Finance – Machu Picchu Self-Help Protocol [2]
Aug 28, 2023
Inclusive Finance – Machu Picchu Self-Help Protocol [2]
Photo by Manish Patel on Unsplash How can proven technologies of the 21st century help the persons-in-need reproduce…
3 Comments
- Inclusive Finance – Machu Picchu Self-Help Protocol [1]
Aug 28, 2023
Inclusive Finance – Machu Picchu Self-Help Protocol [1]
Photo by Manish Patel on Unsplash Executive Summary How can proven technologies of the 21st century help the…
2 Comments
Others also viewed
-
React Native — Ultimate Guide on Debugging , Profiling & Advanced Optimization (iOS + Android)
Hiến Đinh 1y -
Fatbobman's Swift Weekly #086
Fatbobman Xu 6mo -
Top 7 Reasons to Choose Embedded Android for Your Next Project
Abdullah Abdelhakeem 8mo -
Why Is It So Difficult to Work with Embedded Software Engineers?
Austin Kim 5mo -
Fatbobman's Swift Weekly #095
Fatbobman Xu 5mo -
And now for something completely different...
Geoff Hollingworth 1y -
My first decade as a professional software developer
Mohammed Ismail Ansari 6y -
Xcode Instruments: A Guide to Optimizing Your iOS and macOS Apps 🚀
Wagner Assis 1y -
.NET MAUI Performance(Part 1 - Android)
Carlos Gabriel 11mo -
Setup development environment on new Mac
Kapil Sharma 5y
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
Từ khóa » Cài đặt Flutter Trên Mac M1
-
Cài đặt Flutter Trên MacOS 2021
-
Giới Thiệu Flutter Và Cài đặt Flutter Trên MacOS - Viblo
-
MacOS Install - Flutter Documentation
-
Cài đặt Flutter Trên MacOS - Hapolog
-
Lập Trình Flutter, Chạy Máy ảo Android, IOS Trên Macbook M1
-
Flutter Mac M1 Install - YouTube
-
Bài 2.2: Hướng Dẫn Cài đặt Flutter Trên MacOS
-
Bài 2: Cài đặt Flutter - Học Lập Trình Flutter Cơ Bản
-
Free Mac Basics Tutorial - Lập Trình Với Macbook Air M1 - Thủ Thuật
-
Troubleshoot - Flutter DevKit - GitBook
-
GibMacOS Download MacOS Create A Bootable USB And Clean Up ...
-
Cách Thiết Lập Flutter Với Android Studio Trên Linux
-
Dart 2.14 đi Kèm Với Hỗ Trợ Apple M1, Các Nhà Cung Cấp Dịch Vụ Mới ...
-
Cài đặt Java Trên Mac OS - Openplanning