• Skip to main content
  • Skip to primary sidebar

Ravi Shankar

Tweaking Apps

  • About
  • Portfolio
  • Privacy Policy

flutter

Add path variable in MacOS for flutter

March 26, 2021 By Ravi Shankar

Flutter commands can be executed from macOS terminal app after adding the path variable to installation of flutter directory on the local machine. You can set Path variable temporarily by executing the following command in the Terminal app or within the Terminal window inside Visual Studio Code

export PATH="$PATH:`pwd`[FLUTTER_INSTALLATION_DIRECTORY]/bin"

where FLUTTER_INSTALLATION_DIRECTORY represents the installtion of flutter SDK on your local macOS

Setting PATH variable permanently

Mac users having Catlina OS and above can follow the below mentioned steps for setting the PATH variable permanently.

  1. Launch Terminal App.
  2. type touch ~/.zshrc and press enter
  3. type vi ~/.zshrc
  4. add export PATH = $PATH[FLUTTER_INSTALLATION_DIRECTORY]/bin
  5. save the changes.
  6. Reload the changes by typing ~/.zshrc

Now you should be able to run all flutter commands using terminal app.

Filed Under: Android, ios Tagged With: flutter, macOS, terminal

Primary Sidebar

TwitterLinkedin

Recent Posts

  • Easy Split – Link Expense and User object – Flutter – Day 7
  • Easy Split – Adding Expense page – Flutter – Day 6
  • Easy Split – Showing multiple views – Flutter – Day 5
  • Easy Split – Add screen navigation – Flutter – Day 4
  • Easy Split – Add alert dialog – Flutter – Day 3

Copyright 2021 © rshankar.com