0% found this document useful (0 votes)
26 views4 pages

Concise Step-By-Step Guide To Run A Flutter Project On Your Brand-New MacBook, Starting From Scratch

xc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

Concise Step-By-Step Guide To Run A Flutter Project On Your Brand-New MacBook, Starting From Scratch

xc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Front end:

Step 1: Install Flutter

1.Download Flutter:

Go to the Flutter website and download the macOS SDK.

2. Extract Flutter:

• Extract the zip file to a directory (e.g., ~/flutter).

3. Set Flutter in PATH:

• Add Flutter to your shell’s PATH by editing the .zshrc or .bashrc file:
export PATH="$PATH:~/flutter/bin"

• Reload the terminal:


source ~/.zshrc

4. Run Flutter Doctor:

• Open the terminal and type:


flutter doctor

• Follow instructions to fix any missing dependencies.


Step 2: Install Xcode (for iOS Development)

1. Install Xcode:

• Open the App Store, search for Xcode, and install it.

2. Set Up Xcode Command Line Tools:

• Open Xcode, go to Preferences → Locations → select the latest version


under “Command Line Tools.”

3. Accept Xcode License:

• Run the following in the terminal:


sudo xcodebuild -license
Press Enter to accept the terms.
Step 3: Install Android Studio (for Android Development)

1. Download Android Studio:

• Visit the Android Studio website and download the macOS version.

2. Install Android Studio:

• Run the installer and follow the instructions.

3. Set Up the Android SDK:


• Open Android Studio and complete the setup wizard to install the Android SDK and
other tools.

4. Set Up an Emulator:

• Go to Tools → AVD Manager → Create a new emulator by selecting a


device and downloading a system image.
Step 4: Get the Flutter Project

1. Clone the Project or Download:

• Clone the repository:


git clone <repo-url>

• Or download the project zip file and extract it.


Step 5: Install Project Dependencies

1. Navigate to the Project Folder:

• Open the terminal and go to the project directory:


cd /path/to/flutter/project

2. Install Dependencies:

• Run the following command:


flutter pub get
Step 6: Run the Project

1. Select a Target Device:

• Start an Android emulator from Android Studio (AVD Manager) or connect a physical
Android/iOS device.

• To check connected devices:


flutter devices

2. Run the App:

• Execute the command:


flutter run

• If multiple devices are connected, specify one:


flutter run -d <device-id>
Optional Troubleshooting

• If you encounter issues, run:


flutter doctor -v

Backend:

Installation and Setup Guide

1. Install Node.js from the Official Website


1. Visit Node.js official website:
Navigate to https://nodejs.org in your browser.

2. Download the LTS version:


Choose the Long-Term Support (LTS) version for a stable and reliable experience.

3. Open the downloaded .pkg file:


Follow the installation steps provided in the setup wizard.

4. Verify the installation:


Open a terminal and run the following commands to check the Node.js and npm versions:

node -v
npm -v

2. Install Docker

1. Download Docker Desktop:


Visit https://www.docker.com/products/docker-desktop and download Docker Desktop for macOS.

2. Install Docker:
Open the downloaded .dmg file and follow the installation instructions.

3. Start Docker:
Launch Docker Desktop and ensure it is running.

4. Verify the installation:


Check if Docker is installed and running by executing:

docker --version

3. Set Up the Project

1. Clone the repository:


Clone the project from your repository:
git clone <repository-url>

2. Navigate to the project directory:


Move into the project’s working directory:

cd <project-directory>

3. Install dependencies:
Use npm to install the required dependencies:

npm install

4. Build and Run the Docker Container

1. Build the Docker image:


Use the following command to create a Docker image:

docker build -t agent-athlet .

2. Run the Docker image:


Start the container with this command:

docker run -p 3000:3000 agent-athlet:latest

3. Access the application:


The application will now be running, and you can access it on your local machine at
http://0.0.0.0:3000.

5. Application Ready

Your application is now set up and running. You can interact with it as needed. If you encounter any
issues, verify the installation steps and logs.

You might also like