As stated on flutter's website here, I tried setting the environment variable in my Ubuntu 18.10 system. I have saved command in .bashrc but when I source it to run in terminal or run flutter doctor command in a new terminal, it says flutter: command not found.
Surprisingly, when I tried the following command, it worked perfectly but it's temporary:
export PATH="$PATH:`pwd`/flutter/bin"
I want a permanent solution for setting the environment variable.
Output on echo $PATH:
/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Update: I have added echo "$PATH" in .bashrc right after the export PATH command and it does have a flutter path printed in the terminal when I execute source ~/.bashrc but when I enter flutter doctor after that, it still doesn't work!
.bashrcalready which also have alias commands which I use very often. They are working fine. I think the problem is with flutter itself.source ~/.bashrc?