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
Download Flutter SDK
Download the Flutter SDK for your operating system from the official Flutter website.
- macOS
- Linux
- Windows
Add Flutter to PATH
Add the Flutter bin directory to your system PATH.
- macOS/Linux
- Windows
Add this line to your Then reload your shell:
.bashrc, .zshrc, or .bash_profile:Verify Installation
Run the Flutter doctor command to verify your installation:
Flutter doctor checks your environment and displays a report of the status of your Flutter installation. Follow any additional setup instructions it provides.
Clone the Repository
Clone the Trackmart repository to your local machine:Replace
<repository-url> with the actual repository URL provided by your team.Install Dependencies
Get Flutter Packages
Navigate to the project directory and install all dependencies: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…
Configure Firebase
Set up Firebase for your project:
- Create a new Firebase project in the Firebase Console
- Add Android and iOS apps to your Firebase project
- Download the configuration files:
google-services.jsonfor Android (place inandroid/app/)GoogleService-Info.plistfor iOS (place inios/Runner/)
Configure Mapbox (Optional)
If you’re using Mapbox for mapping features:
- Create a Mapbox account at mapbox.com
- Get your access token
- Add the token to your project configuration
Run the Application
Connect a Device or Emulator
Connect a physical device via USB or start an emulator:This lists all connected devices and running emulators.
- Check Devices
- Start Android Emulator
- Start iOS Simulator
Troubleshooting
Gradle build failed (Android)
Gradle build failed (Android)
- Check your Java version:
java -version - Clean the build:
flutter clean && flutter pub get - Rebuild:
cd android && ./gradlew clean && cd .. && flutter run
Pod install failed (iOS)
Pod install failed (iOS)
- Update CocoaPods:
sudo gem install cocoapods - Install pods:
cd ios && pod install && cd .. - Clean and rebuild:
flutter clean && flutter pub get && flutter run
Firebase connection issues
Firebase connection issues
- Verify
google-services.json(Android) is inandroid/app/ - Verify
GoogleService-Info.plist(iOS) is inios/Runner/ - Check that package name matches Firebase configuration
- Ensure Firebase services are enabled in the console
Permission errors
Permission errors
Location permissions are required for the app to function properly. Check:
android/app/src/main/AndroidManifest.xmlfor Android permissionsios/Runner/Info.plistfor iOS permissions
Next Steps
Project Structure
Understand the codebase organization
Dependencies
Learn about the packages used in the project