A modern Flutter application for tracking driving trips with real-time statistics and drive scoring.
lib/
├── main.dart # App entry point
├── firebase_options.dart # Firebase configuration
├── theme/
│ ├── app_colors.dart # Color definitions
│ └── app_theme.dart # Theme configuration
├── models/
│ ├── app_user.dart # User model
│ └── trip.dart # Trip model
├── services/
│ ├── auth_service.dart # Firebase authentication
│ ├── auth_provider.dart # Auth state management
│ ├── trip_service.dart # Trip Firestore operations
│ └── trip_provider.dart # Trip state management
├── screens/
│ ├── login_screen.dart # Authentication screen
│ ├── home_screen.dart # Main home with live tracking
│ ├── trip_detail_screen.dart # Trip details
│ ├── stats_screen.dart # Statistics view
│ ├── history_screen.dart # Trip history
│ └── profile_screen.dart # User profile
└── widgets/
├── live_card.dart # Live tracking card component
└── trip_card.dart # Trip list card component
- Firebase Authentication (Email/Password)
- Real-time trip tracking
- Drive statistics and scoring
- Firestore database for trip storage
- Modern dark theme UI
- Bottom navigation for easy access
- Create a Firebase project at Firebase Console
- Enable Authentication (Email/Password)
- Create a Firestore database in test mode
- Get your Firebase configuration and update
lib/firebase_options.dart
- Add your
google-services.jsontoandroid/app/ - Update
firebase_options.dartwith Android credentials
- Add your
GoogleService-Info.plisttoios/Runner/ - Update
firebase_options.dartwith iOS credentials
flutter pub getflutter runusers/
{uid}/
- email: string
- displayName: string
- photoUrl: string
- createdAt: timestamp
- updatedAt: timestamp
trips/
{tripId}/
- userId: string
- date: timestamp
- distanceKm: number
- durationMinutes: number
- maxSpeedKmh: number
- avgSpeedKmh: number
- createdAt: timestamp
The app uses Provider for state management:
- AuthProvider: Handles authentication state and user info
- TripProvider: Manages trip data and Firestore operations
The app uses a dark theme with custom colors:
- Primary:
#2A5CFF(Blue) - Background:
#0D0D0D(Black) - Surface:
#1A1A1A(Dark Gray) - Success:
#4ADE80(Green) - Warning:
#FACC15(Yellow) - Error:
#F87171(Red)