Home > Blockchain >  How to update path of flutter in macos?
How to update path of flutter in macos?

Time:05-04

Hey I just installed flutter and did everything as in this video: https://www.youtube.com/watch?v=U4TJ5ITGe5Y and also as told on the website: https://docs.flutter.dev/get-started/install/macos#update-your-path.

To update the path of flutter I put this command in the .zshrc file.

export PATH="$PATH:[PATH_OF_FLUTTER_GIT_DIRECTORY]/bin"

However it doesn't work. Does anybody have an idea what I could be doing wrong?

Thanks a lot and have a nice day!

CodePudding user response:

Hopefully this helps...

  1. Open up your terminal by pressing cmd and space, then typing terminal.

  2. enter the command - vim ~/.shrc

  3. Then you want to press i to edit text

  4. then enter 'export PATH="$PATH:pwd/flutter/bin"' (without the ''), pwd = is the path where the flutter folder is found e.g. user/desktop/.

However in most cases the pwd is $HOME /desktop in which cases the command should look like this in the terminal

export PATH="$PATH:$HOME/Deskop/flutter/bin". - in this cases my flutter folder is on my desktop

  1. Press Esc then and enter the command :wq! and done
  • Related