feat: refactor financial wallet UI components and add offline map service support

This commit is contained in:
Hamza-Ayed
2026-04-21 00:35:30 +03:00
parent 4293d20561
commit b92db3bb39
99 changed files with 22888 additions and 27387 deletions

View File

@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../constant/colors.dart';
import '../../../controller/home/captin/behavior_controller.dart';
class BehaviorPage extends StatelessWidget {
@@ -12,6 +13,7 @@ class BehaviorPage extends StatelessWidget {
Widget build(BuildContext context) {
final controller = Get.put(DriverBehaviorController());
controller.fetchDriverBehavior();
final theme = Theme.of(context);
return Scaffold(
appBar: AppBar(
@@ -37,20 +39,23 @@ class BehaviorPage extends StatelessWidget {
child: Column(
children: [
Text("Overall Behavior Score".tr,
style: TextStyle(
fontSize: 20, fontWeight: FontWeight.bold)),
style: theme.textTheme.titleLarge
?.copyWith(fontWeight: FontWeight.bold)),
const SizedBox(height: 10),
Text(
"${controller.overallScore.value.toStringAsFixed(1)} / 100",
style: const TextStyle(
fontSize: 28, color: Colors.blue)),
style: TextStyle(
fontSize: 28,
fontWeight: FontWeight.bold,
color: AppColor.primaryColor)),
],
),
),
),
const SizedBox(height: 20),
Text("Last 10 Trips".tr,
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
style: theme.textTheme.titleMedium
?.copyWith(fontWeight: FontWeight.bold)),
const SizedBox(height: 10),
ListView.builder(
shrinkWrap: true,
@@ -62,7 +67,7 @@ class BehaviorPage extends StatelessWidget {
elevation: 3,
child: ListTile(
leading: CircleAvatar(
backgroundColor: Colors.blue,
backgroundColor: AppColor.primaryColor,
child: Text("${index + 1}",
style: const TextStyle(color: Colors.white)),
),