Update: 2026-07-29 19:44:57

This commit is contained in:
Hamza-Ayed
2026-07-29 19:44:58 +03:00
parent 2cf5c63a1e
commit 90d976e1d1
110 changed files with 2238 additions and 2071 deletions
@@ -3,7 +3,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:intaleq_rider/views/home/my_wallet/payment_history_passenger_page.dart';
import 'package:intaleq_rider/views/home/my_wallet/siro_prime_page.dart';
import 'dart:ui'; // لاستخدام تأثيرات متقدمة
import '../../../constant/box_name.dart';
@@ -18,6 +17,7 @@ import '../../../main.dart';
import '../../widgets/elevated_btn.dart';
import '../../widgets/my_scafold.dart';
import 'passenger_wallet_dialoge.dart';
import 'siro_prime_page.dart';
// --- الويدجت الرئيسية بالتصميم الجديد ---
class PassengerWallet extends StatelessWidget {
@@ -40,54 +40,54 @@ class PassengerWallet extends StatelessWidget {
// استخدام Column لتنظيم المحتوى بشكل أفضل
SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const SizedBox(height: 16),
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const SizedBox(height: 16),
// --- 1. بطاقة المحفظة العصرية ---
_buildModernWalletCard(),
// --- 1. بطاقة المحفظة العصرية ---
_buildModernWalletCard(),
const SizedBox(height: 32),
Text("Actions".tr,
style: AppStyle.title.copyWith(
color: AppColor.writeColor.withOpacity(0.6))),
const Divider(height: 24),
const SizedBox(height: 32),
Text("Actions".tr,
style: AppStyle.title.copyWith(
color: AppColor.writeColor.withOpacity(0.6))),
const Divider(height: 24),
// --- 2. قائمة الخيارات المنظمة ---
_buildActionTile(
icon: Icons.add_card_rounded,
title: 'Top up Balance'.tr,
subtitle: 'Add funds using our secure methods'.tr,
onTap: () =>
showPaymentBottomSheet(context), // نفس دالتك القديمة
),
_buildActionTile(
icon: Icons.history_rounded,
title: 'Payment History'.tr,
subtitle: 'View your past transactions'.tr,
onTap: () => Get.to(
() => const PaymentHistoryPassengerPage(),
transition: Transition.rightToLeftWithFade),
),
_buildActionTile(
icon: Icons.phone_iphone_rounded,
title: 'Set Phone Number'.tr,
subtitle: 'Link a phone number for transfers'.tr,
onTap: () => _showWalletPhoneDialog(context,
Get.find<PaymentController>()), // نفس دالتك القديمة
),
// --- 2. قائمة الخيارات المنظمة ---
_buildActionTile(
icon: Icons.add_card_rounded,
title: 'Top up Balance'.tr,
subtitle: 'Add funds using our secure methods'.tr,
onTap: () =>
showPaymentBottomSheet(context), // نفس دالتك القديمة
),
_buildActionTile(
icon: Icons.history_rounded,
title: 'Payment History'.tr,
subtitle: 'View your past transactions'.tr,
onTap: () => Get.to(
() => const PaymentHistoryPassengerPage(),
transition: Transition.rightToLeftWithFade),
),
_buildActionTile(
icon: Icons.phone_iphone_rounded,
title: 'Set Phone Number'.tr,
subtitle: 'Link a phone number for transfers'.tr,
onTap: () => _showWalletPhoneDialog(context,
Get.find<PaymentController>()), // نفس دالتك القديمة
),
// 👑 Siro Prime Banner
const SizedBox(height: 8),
_buildPrimeBanner(),
],
// 👑 Intaleq Prime Banner
const SizedBox(height: 8),
_buildPrimeBanner(),
],
),
),
),
),
// --- عرض الـ Dialog بنفس طريقتك القديمة ---
// --- عرض الـ Dialog بنفس طريقتك القديمة ---
const PassengerWalletDialog(),
],
),
@@ -266,14 +266,14 @@ class PassengerWallet extends StatelessWidget {
);
}
// 👑 Siro Prime Banner Widget
// 👑 Intaleq Prime Banner Widget
Widget _buildPrimeBanner() {
return GetBuilder<PrimeController>(
builder: (ctrl) {
final bool isPrime = ctrl.isPrime;
return GestureDetector(
onTap: () => Get.to(
() => const SiroPrimePage(),
() => const IntaleqPrimePage(),
transition: Transition.rightToLeftWithFade,
),
child: Container(
@@ -313,7 +313,9 @@ class PassengerWallet extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
isPrime ? 'Siro Prime Active'.tr : 'Siro Prime'.tr,
isPrime
? 'Intaleq Prime Active'.tr
: 'Intaleq Prime'.tr,
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
@@ -324,7 +326,8 @@ class PassengerWallet extends StatelessWidget {
Text(
isPrime
? '${'Valid until'.tr}: ${ctrl.expireAt?.substring(0, 10) ?? ''}'
: 'No surge pricing. Priority rides. Tap to learn more.'.tr,
: 'No surge pricing. Priority rides. Tap to learn more.'
.tr,
style: TextStyle(
color: Colors.white.withOpacity(0.8),
fontSize: 12,
@@ -346,4 +349,4 @@ class PassengerWallet extends StatelessWidget {
}
}
// الكلاس القديم CardSiroWallet لم نعد بحاجة إليه لأنه تم دمجه وتطويره
// الكلاس القديم CardIntaleqWallet لم نعد بحاجة إليه لأنه تم دمجه وتطويره
@@ -7,14 +7,14 @@ import 'package:intaleq_rider/controller/payment/prime_controller.dart';
import 'package:intaleq_rider/main.dart';
import 'dart:math' as math;
class SiroPrimePage extends StatefulWidget {
const SiroPrimePage({super.key});
class IntaleqPrimePage extends StatefulWidget {
const IntaleqPrimePage({super.key});
@override
State<SiroPrimePage> createState() => _SiroPrimePageState();
State<IntaleqPrimePage> createState() => _IntaleqPrimePageState();
}
class _SiroPrimePageState extends State<SiroPrimePage>
class _IntaleqPrimePageState extends State<IntaleqPrimePage>
with TickerProviderStateMixin {
late AnimationController _shimmerController;
late AnimationController _pulseController;
@@ -225,7 +225,7 @@ class _SiroPrimePageState extends State<SiroPrimePage>
],
).createShader(bounds),
child: const Text(
'SIRO PRIME',
'INTALEQ PRIME',
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.w900,