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.
- 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
- Flutter SDK
- Flutter Bloc
- Equatable
- Google Maps Flutter
- Hive Community Edition
- Flutter Icon Launcher
-
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.
Follow the steps below to run the app locally:
git clone https://github.com/ardinbig/fleet-watch.git
cd fleet-watchThis 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.
To run all unit and widget tests use the following command:
$ flutter test --coverage --test-randomize-ordering-seed randomTo view the generated coverage report you can use lcov.
# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/
# Open Coverage Report
$ open coverage/index.htmlThis project relies on flutter_localizations and follows the official internationalization guide for Flutter.
- To add a new localizable string, open the
app_en.arbfile atlib/l10n/arb/app_en.arb.
{
"@@locale": "en",
"fleetWatchTitle": "Fleet Watch",
"@fleetWatchTitle": {
"description": "Text shown in the AppBar of the Fleet Watch Page"
},
}
- 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"
}
}
- Use the new string
import 'package:fleet_watch/l10n/l10n.dart';
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return Text(l10n.helloWorld);
}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>
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.