• Skip to main content
  • Skip to primary sidebar

Ravi Shankar

Tweaking Apps

  • Swift
  • Tech Tips

terminal

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

  • How to block keywords in Jio broadband
  • How to disable opening an app automatically at login in Mac
  • How to set preferred Wifi network on Mac
  • Attribute Unavailable: Estimated section warning before iOS 11.0
  • How to recover Firefox password from Time Machine backup

Pages

  • About
  • Privacy Policy
  • Terms and Conditions

Copyright 2022 © rshankar.com

Terms and Conditions - Privacy Policy