Update: 2026-07-30 12:31:26

This commit is contained in:
Hamza-Ayed
2026-07-30 12:31:27 +03:00
parent ecfe756849
commit 7a576b7327
10 changed files with 307 additions and 84 deletions
@@ -680,10 +680,15 @@ class LoginDriverController extends GetxController {
Get.off(() => HomeCaptain());
} else {
mySnackbarError('Login failed'.tr);
mySnackbarError(
(jsonDecoeded['message'] ?? 'Login failed').toString().tr);
isloading = false;
update();
}
} else if (response.statusCode == 429) {
mySnackbarError('Too many attempts. Please wait a minute.'.tr);
isloading = false;
update();
} else {
mySnackbarError('Server error'.tr);
isloading = false;
@@ -119,7 +119,8 @@ class RatePassenger extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
CurrencyHelper.currency, // Replace with your local currency symbol if needed
CurrencyHelper
.currency, // Replace with your local currency symbol if needed
style: TextStyle(
color: Colors.white.withOpacity(0.8),
fontSize: 24,
@@ -17,12 +17,15 @@ class PaymentHistoryDriverPage extends StatelessWidget {
backgroundColor: FinanceDesignSystem.backgroundColor,
appBar: AppBar(
title: Text('Payment History'.tr,
style: TextStyle(fontWeight: FontWeight.bold, color: FinanceDesignSystem.primaryDark)),
style: TextStyle(
fontWeight: FontWeight.bold,
color: FinanceDesignSystem.primaryDark)),
backgroundColor: Colors.transparent,
elevation: 0,
centerTitle: true,
leading: IconButton(
icon: Icon(Icons.arrow_back_ios_new_rounded, color: FinanceDesignSystem.primaryDark, size: 20),
icon: Icon(Icons.arrow_back_ios_new_rounded,
color: FinanceDesignSystem.primaryDark, size: 20),
onPressed: () => Get.back(),
),
),
@@ -37,10 +40,13 @@ class PaymentHistoryDriverPage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.history_rounded, size: 80, color: Colors.grey.shade300),
Icon(Icons.history_rounded,
size: 80, color: Colors.grey.shade300),
const SizedBox(height: 16),
Text('No transactions yet'.tr,
style: TextStyle(color: Colors.grey.shade400, fontWeight: FontWeight.bold)),
style: TextStyle(
color: Colors.grey.shade400,
fontWeight: FontWeight.bold)),
],
),
);
@@ -52,8 +58,9 @@ class PaymentHistoryDriverPage extends StatelessWidget {
itemCount: controller.archive.length,
itemBuilder: (BuildContext context, int index) {
final tx = controller.archive[index];
final double amount = double.tryParse(tx['amount']?.toString() ?? '0') ?? 0;
final double amount =
double.tryParse(tx['amount']?.toString() ?? '0') ?? 0;
return AnimationConfiguration.staggeredList(
position: index,
duration: const Duration(milliseconds: 375),