Update: 2026-07-13 18:23:52

This commit is contained in:
Hamza-Ayed
2026-07-13 18:23:52 +03:00
parent 7bf6dc1be7
commit fd3f4a365a
23 changed files with 802 additions and 31 deletions
@@ -8,6 +8,7 @@ import '../../controller/transit/transit_driver_controller.dart';
import '../../controller/transit/transit_driver_models.dart';
import '../widgets/elevated_btn.dart';
import '../widgets/my_scafold.dart';
import 'qr_scanner_page.dart';
class TransitDriverHomePage extends StatelessWidget {
const TransitDriverHomePage({super.key});
@@ -194,7 +195,7 @@ class _ActivationPage extends StatelessWidget {
width: 88,
height: 88,
decoration: BoxDecoration(
color: AppColor.accentColor.withOpacity(0.12),
color: AppColor.accentColor.withValues(alpha: 0.12),
shape: BoxShape.circle,
),
child: Icon(Icons.directions_bus_rounded,
@@ -236,24 +237,14 @@ class _ActivationPage extends StatelessWidget {
const SizedBox(height: 20),
SizedBox(
width: double.infinity,
height: 55,
child: controller.isActivating
? const Center(child: CircularProgressIndicator())
: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: AppColor.accentColor,
padding: const EdgeInsets.symmetric(vertical: 14),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)),
),
: MyElevatedButton(
kolor: AppColor.accentColor,
onPressed: () =>
controller.activateWithToken(tokenCtrl.text),
child: Text(
'Activate'.tr,
style: const TextStyle(
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.bold),
),
title: 'Activate'.tr,
),
),
const SizedBox(height: 16),
@@ -284,15 +275,28 @@ class _CurrentStopBanner extends StatelessWidget {
return Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
color: AppColor.greenColor.withOpacity(0.12),
color: AppColor.greenColor.withValues(alpha: 0.12),
child: Row(
children: [
Icon(Icons.location_on_rounded, color: AppColor.greenColor, size: 18),
const SizedBox(width: 8),
Text(
'${'Now at'.tr}: ${stop.nameAr}',
style: AppStyle.subtitle.copyWith(
color: AppColor.greenColor, fontWeight: FontWeight.bold),
Expanded(
child: Text(
'${'Now at'.tr}: ${stop.nameAr}',
style: AppStyle.subtitle.copyWith(
color: AppColor.greenColor, fontWeight: FontWeight.bold),
),
),
SizedBox(
height: 35,
width: 80,
child: MyElevatedButton(
onPressed: () {
Get.to(() => QRScannerPage(stopId: stop.id, stopName: stop.nameAr));
},
kolor: AppColor.accentColor,
title: 'Scan'.tr,
),
),
],
),