Skip to content

ardinbig/fleet-watch

Repository files navigation

🚗 Fleet Watch App

coverage style: very good analysis License: MIT

Generated by the Very Good CLI 🤖

A Flutter application that tracks and displays cars on a map in real-time, allows viewing car details, and supports offline mode with local caching.


📱 Features

  • Real-time map view with car markers
  • Tap on markers to view car details
  • Live tracking of individual cars
  • Search and filter by car name or status (Moving/Parked)
  • Offline support with cached data

🔗 Technologies Used

  • Flutter SDK
  • Flutter Bloc
  • Equatable
  • Google Maps Flutter
  • Hive Community Edition
  • Flutter Icon Launcher

⚠️ Limitations

  • No official design/mockup
    Having no provided design or mockup, a significant amount of time was spent imagining the app’s interface and user experience.

  • Simulated data only
    Creating mock car data (latitudes/longitudes) was challenging, especially to achieve a realistic spread of positions on the map. The points may appear clustered or less dispersed than in a real-world scenario.


📹 Demo Video

🎥 Watch Full Demo on MEGA


🖥️ Screenshots

Home Screen - Map View
Shows all cars on a map using Google Maps.
Home Screen - Search
Search bar to find cars by name or ID.
Home Screen - Filter
Filter to show only "Moving" or "Parked" cars.
Car Detail View
Displays car name, speed, and last known
location with a mini-map.
Car Tracking Activated
Shows live tracking on mini-map when enabled.
Offline Mode
Indicates when the device is offline and
data is loaded from local storage.

Getting Started 🚀

Follow the steps below to run the app locally:

1. Clone the Repository

git clone https://github.com/ardinbig/fleet-watch.git
cd fleet-watch

2. Run the Project

This project contains 3 flavors:

  • development
  • staging
  • production

To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands:

# Development
$ flutter run --flavor development --target lib/main_development.dart

# Staging
$ flutter run --flavor staging --target lib/main_staging.dart

# Production
$ flutter run --flavor production --target lib/main_production.dart

*Fleet Watch works on iOS and Android.


Running Tests 🧪

To run all unit and widget tests use the following command:

$ flutter test --coverage --test-randomize-ordering-seed random

To view the generated coverage report you can use lcov.

# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
$ open coverage/index.html

Working with Translations 🌐

This project relies on flutter_localizations and follows the official internationalization guide for Flutter.

Adding Strings

  1. To add a new localizable string, open the app_en.arb file at lib/l10n/arb/app_en.arb.
{
    "@@locale": "en",
    "fleetWatchTitle": "Fleet Watch",
    "@fleetWatchTitle": {
        "description": "Text shown in the AppBar of the Fleet Watch Page"
    },
}
  1. Then add a new key/value and description
{
    "@@locale": "en",
    "fleetWatchTitle": "Fleet Watch",
    "@fleetWatchTitle": {
        "description": "Text shown in the AppBar of the Fleet Watch Page"
    },
    "helloWorld": "Hello World",
    "@helloWorld": {
        "description": "Hello World Text"
    }
}
  1. Use the new string
import 'package:fleet_watch/l10n/l10n.dart';

@override
Widget build(BuildContext context) {
  final l10n = context.l10n;
  return Text(l10n.helloWorld);
}

Adding Supported Locales

Update the CFBundleLocalizations array in the Info.plist at ios/Runner/Info.plist to include the new locale.

<key>CFBundleLocalizations</key>
<array>
	<string>en</string>
	<string>fr</string>
</array>

Generating Translations

To use the latest translations changes, you will need to generate them:

flutter gen-l10n --arb-dir="lib/l10n/arb"

💡 Make sure you have a device/emulator with Google Play services for the Google Maps plugin.

Alternatively, run flutter run and code generation will take place automatically.

About

Flutter app that displays cars on a map in real time, allows users to view car details, and track individual cars' locations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages