Update: 2026-08-08 16:55:39
This commit is contained in:
@@ -5,7 +5,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:siro_driver/constant/finance_design_system.dart';
|
||||
import 'package:siro_driver/controller/home/payment/captain_wallet_controller.dart';
|
||||
import 'package:siro_driver/views/widgets/mycircular.dart';
|
||||
import 'package:siro_driver/views/widgets/elevated_btn.dart';
|
||||
import 'package:siro_driver/views/widgets/my_textField.dart';
|
||||
import 'package:siro_driver/views/widgets/mydialoug.dart';
|
||||
@@ -25,6 +24,7 @@ import 'widgets/quick_actions.dart';
|
||||
import 'widgets/financial_summary_card.dart';
|
||||
import 'widgets/promo_gamification_card.dart';
|
||||
import 'widgets/transaction_preview_item.dart';
|
||||
import '../../widgets/ui/siro_ui.dart';
|
||||
|
||||
class WalletCaptainRefactored extends StatefulWidget {
|
||||
const WalletCaptainRefactored({super.key});
|
||||
@@ -49,34 +49,20 @@ class _WalletCaptainRefactoredState extends State<WalletCaptainRefactored> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: FinanceDesignSystem.backgroundColor,
|
||||
appBar: AppBar(
|
||||
title: Text('Driver Balance'.tr,
|
||||
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),
|
||||
onPressed: () => Get.back(),
|
||||
// شريط العنوان من الثيم — لا ألوان مبنيّة يدوياً هنا.
|
||||
return SiroPage(
|
||||
title: 'Driver Balance'.tr,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.refresh_rounded),
|
||||
onPressed: () => controller.refreshCaptainWallet(),
|
||||
tooltip: 'Refresh'.tr,
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.refresh_rounded,
|
||||
color: FinanceDesignSystem.primaryDark),
|
||||
onPressed: () => controller.refreshCaptainWallet(),
|
||||
tooltip: 'Refresh'.tr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
body: GetBuilder<CaptainWalletController>(
|
||||
builder: (controller) {
|
||||
if (controller.isLoading) {
|
||||
return const Center(child: MyCircularProgressIndicator());
|
||||
return const SiroLoading();
|
||||
}
|
||||
return SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
@@ -145,7 +131,7 @@ class _WalletCaptainRefactoredState extends State<WalletCaptainRefactored> {
|
||||
Text('Recharge Balance'.tr,
|
||||
style: FinanceDesignSystem.headingStyle),
|
||||
Icon(Icons.info_outline_rounded,
|
||||
size: 18, color: Colors.grey.shade400),
|
||||
size: 18, color: FinanceDesignSystem.textMuted),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
@@ -233,7 +219,7 @@ class _WalletCaptainRefactoredState extends State<WalletCaptainRefactored> {
|
||||
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||
child: Center(
|
||||
child: Text("No transactions yet".tr,
|
||||
style: TextStyle(color: Colors.grey.shade400))),
|
||||
style: TextStyle(color: FinanceDesignSystem.textMuted))),
|
||||
);
|
||||
}
|
||||
// Show only last 3
|
||||
@@ -270,8 +256,9 @@ class _WalletCaptainRefactoredState extends State<WalletCaptainRefactored> {
|
||||
Get.bottomSheet(
|
||||
Container(
|
||||
padding: const EdgeInsets.all(24),
|
||||
// كان `Colors.white` ثابتاً ⇒ ورقة بيضاء بنص فاتح في الوضع الليلي.
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: FinanceDesignSystem.cardColor,
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(24)),
|
||||
),
|
||||
child: Column(
|
||||
|
||||
Reference in New Issue
Block a user