ZSH: command not found: flutter

zsh: command not found: flutter

If you receive the error message "zsh: command not found: flutter", it means that the zsh shell does not recognize the flutter command. To fix this, you can try the following steps:

  1. Check if you have installed the Flutter SDK properly on your machine. If not, follow the instructions on the Flutter website to install it.

  2. Make sure that the Flutter binary is added to your PATH environment variable. You can do this by running the following command:

export PATH="$PATH:$HOME/flutter/bin"
  1. Restart your terminal session or run the following command to reload your zsh shell configuration:

source ~/.zshrc
  1. Try running the flutter command again. If it still fails, you may need to run the following command to fix the issue:

hash -r

You can also try uninstalling and re-installing the Flutter SDK if the issue persists.

How to install Flutter SDK

To install the Flutter SDK on Windows, MacOS, and Linux, follow the instructions on the Flutter website:

  1. On Windows, download the Flutter SDK from the Flutter website and unzip it to a location on your computer.

  2. On MacOS and Linux, open a terminal window and run the following commands:

# Download the Flutter SDK
$ git clone https://github.com/flutter/flutter.git

# Navigate to the flutter directory
$ cd flutter

# Run the flutter doctor command to check for any dependencies that need to be installed
$ flutter doctor
  1. If the flutter doctor command reports any missing dependencies, follow the instructions on the Flutter website to install them.

  2. Once all dependencies are installed, you can run the flutter command to access the Flutter tools.

Note: The installation process may vary slightly depending on your operating system and version. Refer to the Flutter website for the latest instructions.

Useful links:



What is Flutter?

Flutter is an open-source mobile application development framework created by Google. It allows developers to build cross-platform mobile applications using a single codebase written in the Dart programming language. Flutter provides a rich set of customizable widgets and tools for building beautiful and responsive user interfaces and integrates with popular development tools such as Android Studio and Visual Studio Code. Developers widely use Flutter to build applications for Android, iOS, Windows, MacOS, Linux, and the web.