Skip to main content

Prerequisites

Before you begin, ensure you have the following installed on your system:

Flutter SDK

Flutter SDK version compatible with Dart 2.2.0 - 3.0.0

Git

Version control system for cloning the repository

IDE

Android Studio, VS Code, or IntelliJ IDEA with Flutter plugins

Platform Tools

Xcode (for iOS) or Android Studio (for Android)

Flutter SDK Setup

1

Download Flutter SDK

Download the Flutter SDK for your operating system from the official Flutter website.
cd ~/development
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_<version>-stable.zip
unzip flutter_macos_<version>-stable.zip
2

Add Flutter to PATH

Add the Flutter bin directory to your system PATH.
Add this line to your .bashrc, .zshrc, or .bash_profile:
export PATH="$PATH:`pwd`/flutter/bin"
Then reload your shell:
source ~/.bashrc  # or source ~/.zshrc
3

Verify Installation

Run the Flutter doctor command to verify your installation:
flutter doctor
Flutter doctor checks your environment and displays a report of the status of your Flutter installation. Follow any additional setup instructions it provides.
4

Accept Android Licenses

If you’re developing for Android, accept the Android licenses:
flutter doctor --android-licenses

Clone the Repository

Clone the Trackmart repository to your local machine:
git clone <repository-url>
cd trackmart
Replace <repository-url> with the actual repository URL provided by your team.

Install Dependencies

1

Get Flutter Packages

Navigate to the project directory and install all dependencies:
flutter pub get
This command reads the pubspec.yaml file and downloads all required packages including:
  • Firebase packages (auth, database, storage, messaging)
  • Map packages (flutter_map, geolocator)
  • UI packages (cached_network_image, smooth_star_rating)
  • And more…
2

Configure Firebase

Set up Firebase for your project:
  1. Create a new Firebase project in the Firebase Console
  2. Add Android and iOS apps to your Firebase project
  3. Download the configuration files:
    • google-services.json for Android (place in android/app/)
    • GoogleService-Info.plist for iOS (place in ios/Runner/)
Without proper Firebase configuration, authentication and database features will not work.
3

Configure Mapbox (Optional)

If you’re using Mapbox for mapping features:
  1. Create a Mapbox account at mapbox.com
  2. Get your access token
  3. Add the token to your project configuration

Run the Application

1

Connect a Device or Emulator

Connect a physical device via USB or start an emulator:
flutter devices
This lists all connected devices and running emulators.
2

Run the App

Launch the application:
flutter run
For specific platforms:
flutter run -d android
3

Verify the App is Running

Once the app launches, you should see the Trackmart splash screen with the truck icon, followed by the login page.
Use hot reload (r in terminal) during development to see changes instantly without restarting the app.

Troubleshooting

  1. Check your Java version: java -version
  2. Clean the build: flutter clean && flutter pub get
  3. Rebuild: cd android && ./gradlew clean && cd .. && flutter run
  1. Update CocoaPods: sudo gem install cocoapods
  2. Install pods: cd ios && pod install && cd ..
  3. Clean and rebuild: flutter clean && flutter pub get && flutter run
  1. Verify google-services.json (Android) is in android/app/
  2. Verify GoogleService-Info.plist (iOS) is in ios/Runner/
  3. Check that package name matches Firebase configuration
  4. Ensure Firebase services are enabled in the console
Location permissions are required for the app to function properly. Check:
  • android/app/src/main/AndroidManifest.xml for Android permissions
  • ios/Runner/Info.plist for iOS permissions

Next Steps

Project Structure

Understand the codebase organization

Dependencies

Learn about the packages used in the project

Build docs developers (and LLMs) love