Flutter App Setup Guide

Welcome to the fixmate mobile application documentation. This guide will help you set up, customize, and build the Flutter app for Android and iOS.

Prerequisites: Ensure you have Flutter SDK installed (version >= 3.0.0) and an IDE like VS Code or Android Studio.

1. Project Setup

Follow these steps to initialize the project:

  1. Unzip the fixmate_app source code.
  2. Open the project folder in your IDE (VS Code or Android Studio).
  3. Open a terminal in the project root and run the following command to install dependencies:
flutter pub get

Running the App

To run the app on a connected device or emulator:

  1. Connect your Android device (enable USB Debugging) or start an iOS Simulator / Android Emulator.
  2. Run the following command:
flutter run

You can also press F5 in VS Code or click the Run button in Android Studio.


2. API Configuration

Before building the app, you must connect it to your hosted backend server.

Security Requirement: The app requires an HTTPS connection for all API requests. Plain HTTP (http://) is not supported in production builds for security reasons.
  1. Navigate to lib/config/app_config.dart.
  2. Update the baseUrl variable with your backend domain (e.g., https://api.yourdomain.com/api).
// lib/config/app_config.dart

class AppConfig {
  // Replace with your actual domain (MUST use https://)
  static const String baseUrl = 'https://your-api-domain.com/api'; 
  ...
}

How to Configure your Server URL:

  • Production: Use your registered domain with an SSL certificate (e.g., https://api.myapp.com/api).
  • Local Testing (Android): Use https://10.0.2.2:8000/api if using a local Laravel server with SSL proxy (like Ngrok).
  • Local Testing (iOS): Use your computer's local IP address with HTTPS.
Note: Ensure your backend is properly configured with CORS allowed for the app and that you have a valid SSL certificate.


3. Branding & Customization

Change App Name

To change the display name of the app:

  1. Open lib/config/app_config.dart and update the appName variable.
  2. Run the following command to update native configuration files:
flutter pub run rename_app:main all="Your New App Name"

Note: You may need to add rename_app to your pubspec.yaml or update AndroidManifest.xml and Info.plist manually if you prefer.

Change Package Name

To change the package name (Bundle ID), we recommend using the change_app_package_name package (included or install it globally):

flutter pub run change_app_package_name:main com.yourcompany.appname

The app uses flutter_launcher_icons to generate app icons.

  1. Replace the logo file at assets/images/logo.png with your own (recommended size: 1024x1024px).
  2. Open pubspec.yaml and verify the configuration:
flutter_launcher_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/images/logo.png"
  ...

3. Run the valid command to generate the icons:

flutter pub run flutter_launcher_icons

Change App Colors

To change the primary theme color:

  1. Open lib/config/app_config.dart.
  2. Update the primaryColor variable.
// lib/config/app_config.dart

class AppConfig {
  ...
  static const Color primaryColor = Color(0xFFC04F18); // Change hex code here
  ...
}

Homepage Layouts

The app comes with 4 pre-built homepage designs. You can toggle between them instantly by updating the homeLayout constant.

Variant Style Description
HomeLayout.v1 Standard Classic grid of categories with a vertical list of services.
HomeLayout.v2 Modern Card-based design with horizontal scrolling sections.
HomeLayout.v3 Minimalist Clean, search-focused layout with generous white space.
HomeLayout.v4 Dynamic Default. Premium dashboard with banners, promotions, and rich interactive cards.

To switch layouts, open lib/config/app_config.dart and change the following line:

static const HomeLayout homeLayout = HomeLayout.v4; // Change to v1, v2, or v3

Basic Project Edits

Common customizations for your project:

  • Images & Assets: Replace existing images in the assets/images/ folder. Ensure filenames remain the same or update references in the code.
  • Texts & Translations: Edit text strings in the lib/l10n/ directory (for multi-language support) or check lib/constants/ if hardcoded.
  • Onboarding Screens: content is often found in lib/screens/onboarding/ or configured via lib/config/.

4. Build & Deploy

Once you are ready to publish, use the following commands to build the release artifacts.

Android (APK & App Bundle)

# Build APK
flutter build apk --release

# Build App Bundle (AAB) for Play Store
flutter build appbundle --release

iOS (IPA)

# Build IPA for App Store
flutter build ipa --release

You can find the generated files in the build/app/outputs/flutter-apk/ (Android) or verify the archive in Xcode (iOS).