ProKit Flutter - Documentation
ProKit Flutter

How to setup Flutter Environment

πŸ•’ Estimated Reading: 2 Minutes
πŸ“‚ Location: 
FAQs β†’ App FAQs β†’ How to Setup Flutter Environment

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

🧰 Setup Flutter Environment for Your System

To install and set up Flutter, follow the steps below based on your operating system (Windows, macOS, Linux).

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

βœ… Step 1: Install Flutter SDK

  1. Download theΒ Flutter SDKΒ based on your operating system.
  2. Extract the downloaded ZIP file.

πŸ’‘ TIP: To manage multiple Flutter versions easily, follow these steps:

  • Create a folder namedΒ flutter_sdk
  • Extract the ZIP into theΒ flutter_sdkΒ folder
  • Rename the extracted folder to something likeΒ flutter_3_27_0
  • Copy the path to theΒ binΒ directory (Right-click onΒ binΒ > Properties or Info to get full path)

βš™οΈ Step 2: Add SDK Path to Your Environment

πŸͺŸ For Windows:

  1. Open Start Menu β†’ Search β€œEdit Environment variables for your account”.
  2. Find theΒ PathΒ variable β†’ Click β€œEdit” (or create a new one namedΒ Path).
  3. Paste the path to your FlutterΒ binΒ directory.
  4. Click β€œOK” on all windows to save changes.
  5. Open Command Prompt and run:
flutter doctor

This verifies if Flutter is now accessible globally.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

🍎 For macOS/Linux:

1. Open Terminal: Launch the Terminal application on your macOS or Linux system.

2. Navigate to Home Directory: You can navigate to your home directory by typing β€œcd ~” and pressing Enter.

3. Open or Create the Configuration File: Use a text editor like β€œNano” or β€œVim” to open or create the .bashrc or .zshrc file. For example:

nano ~/.bashrc  # For Bash
nano ~/.zshrc   # For Z shell (zsh)

4. Add Flutter to PATH: Add the following line at the end of the file, replacing [PATH_TO_FLUTTER_BIN] with the actual path to the Flutter bin directory:

export PATH="$PATH:[PATH_TO_FLUTTER_BIN]"

For example, if Flutter is located in your home directory under a folder named flutter_3_27_0, the line would look like this:

export PATH=”$PATH:$HOME/flutter_sdk/flutter_3_27_0/bin”

5. Save Changes: Save the changes you made to the file. In Nano, you can do this by pressing Ctrl + X, then Y to confirm, and finally Enter to save.

6. Apply Changes: To apply the changes to the current Terminal session, run:

source ~/.bashrc  # For Bash
source ~/.zshrc   # For Z shell (zsh)

7. Open a new terminal and run:

flutter doctor

This checks whether Flutter is working globally