# Front-End Setup Guide

Welcome to the Furniture Delivery App front-end development setup guide. This document provides step-by-step instructions for setting up the development environment and running the application.

## **Prerequisites**

Before proceeding, ensure you have the following prerequisites installed:

1. **Flutter SDK**: The core framework for building the app.
2. **Android Studio**: The recommended IDE for Flutter development.
3. **Dart Plugin**: Required for Flutter development in Android Studio.
4. **Flutter Plugin**: Required for Flutter development in Android Studio.
5. **Git**: Version control system to clone and manage the project repository.
6. **Google Maps API Key**: Required for map functionalities in the app.

## **Step-by-Step Setup**

### **1. Installing Flutter and Android Studio**

1. **Download Flutter SDK**:
    - Visit the [Flutter installation page](https://flutter.dev/docs/get-started/install).
    - Download the latest stable release of the Flutter SDK for your operating system.
2. **Extract the Flutter SDK**:
    - Extract the downloaded zip file to a preferred location on your system (e.g., **`C:\src\flutter`** for Windows).
3. **Add Flutter to the PATH**:
    - Update your environment variables to include the path to the Flutter bin directory.
4. **Install Android Studio**:
    - Download and install Android Studio from the [official site](https://developer.android.com/studio).
    - During installation, ensure that the Flutter and Dart plugins are installed.

### **2. Configuring Flutter and Android Studio**

1. **Run Flutter Doctor**:
    - Open a terminal or command prompt.
    - Run the command: **`flutter doctor`**.
    - This command checks your environment and displays a report on the terminal window.
2. **Set Up an Android Emulator**:
    - Open Android Studio and navigate to AVD Manager.
    - Create a new Android Virtual Device (AVD) with your preferred configuration.

### **3. Setting up the Project**

1. **Clone the Repository**:
    - Use Git to clone the project repository to your local machine.
    - Command: **`git clone [[repository_url]](https://github.com/ukaydelivery/mobile-frontend)`**.
2. **Open the Project in Android Studio**:
    - Open Android Studio.
    - Select 'Open an Existing Project' and navigate to the cloned project directory.
3. **Google Maps API Key Configuration**:
    - Obtain a Google Maps API key following the [official guide](https://developers.google.com/maps/documentation/android-sdk/get-api-key).
    - Place your API key in the Android manifest file (**`android/app/src/main/AndroidManifest.xml`**) under the **`meta-data`** tag named **`com.google.android.geo.API_KEY`**.

### **4. Running the App**

1. **Start the Emulator**:
    - From Android Studio, start the configured Android Emulator.
2. **Run the App**:
    - Select the target device in Android Studio.
    - Click the 'Run' button (green triangle) or use the shortcut **`Shift + F10`**.
3. **Debugging and Hot Reload**:
    - Make changes to your code.
    - Use Hot Reload (lightning bolt icon) to instantly view the changes in the emulator without restarting the app.

## **Additional Notes**

- **Dependencies**: Ensure all dependencies are correctly listed in **`pubspec.yaml`** and run **`flutter pub get`** in the terminal to fetch them.
- **Environment Variables**: If the project uses any environment variables (like API keys or secret tokens), ensure they are correctly set up in the development environment.

This guide should provide you with a comprehensive setup for starting front-end development on the Furniture Delivery App. For more specific instructions or troubleshooting, refer to the official Flutter documentation or contact the project maintainers.