KiviCare (TM) Pharma Addon- Documentation
KiviCare (TM) Pharma Addon

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

/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / //

Setup Flutter Environment for your System

Install Flutter SDK

  • Install Flutter SDK depending on your OS.
  • Extract the Zip.

TIP

To Keep Flutter SDK easily manageable we recommend few tips for Storing sdk.

  • Create flutter_sdk folder.
  • Extract the zip into the “flutter_sdk” directory.
  • Rename the extracted directory with relevant flutter_version (i.e If you have installed flutter 3.27.0 than rename the directory as “flutter_3_27_0”)

Copy the Flutter path to the bin directory. (i.e – Right Click on bin directory and open properties/info, you can see the full path to Flutter “bin” directory)

Add SDK Path to your Environment

Windows

  • Open Search bar and Search for “Edit Environment variables for your account”.
  • If “Path” variable exist in you environment variable than click on “Edit” else click on “New” and name the variable “Path”
  • paste the Path to the Flutter bin directory into “Path” variable.
  • Click “OK” on all windows to save the changes.
  • Open a new command prompt window and run flutter doctor to verify that Flutter is now accessible from anywhere.

macOS and Linux

  • Open Terminal: Launch the Terminal application on your macOS or Linux system.
  • Navigate to Home Directory: You can navigate to your home directory by typing “cd ~” and pressing Enter.
  • 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)
  • 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”

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.

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

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

Verify Flutter Installation: Open a new Terminal window or tab, and run flutter doctor to verify that Flutter is now accessible from anywhere.