How to Set Up Flutter in VSCode on Mac with ARM Chip: A Complete Guide

Recently I set up flutter on my mac M1 laptop in VS code, Its pretty straightforward if out follow these steps~

Prerequisites

  1. Install Flutter SDK: Begin by downloading the Flutter SDK from the official website or opt for a homebrew installation:

     git clone https://github.com/flutter/flutter.git -b stable
     export PATH="$PWD/flutter/bin:$PATH"
    
  2. Install Xcode: If you haven’t already, acquire Xcode from the App Store.

Setting Up Flutter in VSCode

  1. Install VSCode: Head to the official website and download Visual Studio Code.

  2. Install Flutter and Dart Extensions:

    • Open VSCode.

    • Go to the Extensions sidebar (Ctrl+Shift+X).

    • Search for "Flutter" and "Dart" extensions by the Flutter team.

    • Install both extensions.

  3. Configure Flutter SDK Path:

    • Press Cmd + Shift + P (macOS) to access the Command Palette.

    • Type "Flutter: Select Flutter SDK" and choose it.

    • Navigate to the Flutter SDK path and select it.

  4. Set Up PATH:

    • Launch Terminal and execute:
    open ~/.zshrc
  • Add the Flutter path to your PATH variable:
    export PATH="$PATH:`pwd`/flutter/bin"
  • Save the changes and exit the file.
  1. Run Flutter Doctor:

    • Open Terminal and run:
    flutter doctor

This command identifies any issues with your Flutter setup and provides corrective instructions.

iOS Setup (Optional)

For iOS development, follow these additional steps:

  1. Install CocoaPods:

     sudo gem install cocoapods
     pod setup
    

    This is necessary for Flutter iOS development.

And You are done!!!!