add new featurs like new stat page

This commit is contained in:
Hamza-Ayed
2026-05-08 22:44:55 +03:00
parent efbc921273
commit 8f555691b9
33 changed files with 1194 additions and 585 deletions

View File

@@ -3,8 +3,6 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:local_auth/local_auth.dart';
import 'package:sefer_driver/constant/colors.dart';
import 'package:sefer_driver/constant/style.dart';
import 'package:sefer_driver/controller/home/payment/captain_wallet_controller.dart';
import 'package:sefer_driver/controller/payment/payment_controller.dart';
import 'package:sefer_driver/controller/payment/smsPaymnet/payment_services.dart';
@@ -45,7 +43,7 @@ class PointsCaptain extends StatelessWidget {
color: Colors.white,
borderRadius: BorderRadius.circular(20),
elevation: 4,
shadowColor: kolor.withOpacity(0.3),
shadowColor: kolor.withValues(alpha: 0.3),
child: InkWell(
onTap: () => _showPaymentOptions(context),
borderRadius: BorderRadius.circular(20),
@@ -58,11 +56,12 @@ class PointsCaptain extends StatelessWidget {
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
kolor.withOpacity(0.05),
kolor.withValues(alpha: 0.05),
Colors.white,
],
),
border: Border.all(color: kolor.withOpacity(0.2), width: 1.5),
border:
Border.all(color: kolor.withValues(alpha: 0.2), width: 1.5),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -70,7 +69,7 @@ class PointsCaptain extends StatelessWidget {
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: kolor.withOpacity(0.1),
color: kolor.withValues(alpha: 0.1),
shape: BoxShape.circle,
),
child: Icon(Icons.account_balance_wallet_rounded,
@@ -79,7 +78,7 @@ class PointsCaptain extends StatelessWidget {
const SizedBox(height: 10),
Text(
'$countPoint ${'SYP'.tr}',
style: const TextStyle(
style: TextStyle(
fontWeight: FontWeight.w900,
fontSize: 15,
color: FinanceDesignSystem.primaryDark,
@@ -110,9 +109,9 @@ class PointsCaptain extends StatelessWidget {
maxHeight: MediaQuery.of(context).size.height * 0.8,
),
padding: const EdgeInsets.fromLTRB(24, 24, 24, 32),
decoration: const BoxDecoration(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.vertical(top: Radius.circular(32)),
borderRadius: const BorderRadius.vertical(top: Radius.circular(32)),
),
child: SingleChildScrollView(
child: Column(
@@ -131,8 +130,7 @@ class PointsCaptain extends StatelessWidget {
],
),
const SizedBox(height: 8),
Text(
"${'Amount to charge:'.tr} $countPoint ${'SYP'.tr}",
Text("${'Amount to charge:'.tr} $countPoint ${'SYP'.tr}",
style: FinanceDesignSystem.subHeadingStyle),
const SizedBox(height: 24),
_buildPaymentMethodTile(
@@ -211,7 +209,7 @@ class PointsCaptain extends StatelessWidget {
borderRadius: BorderRadius.circular(14),
boxShadow: [
BoxShadow(
color: color.withOpacity(0.1),
color: color.withValues(alpha: 0.1),
blurRadius: 10,
offset: const Offset(0, 4),
),
@@ -227,7 +225,7 @@ class PointsCaptain extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title,
style: const TextStyle(
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: FinanceDesignSystem.primaryDark)),
@@ -285,8 +283,7 @@ class PaymentScreen extends StatefulWidget {
final String countPrice;
const PaymentScreen(
{required this.iframeUrl, Key? key, required this.countPrice})
: super(key: key);
{required this.iframeUrl, super.key, required this.countPrice});
@override
State<PaymentScreen> createState() => _PaymentScreenState();
@@ -439,8 +436,7 @@ class PaymentScreenWallet extends StatefulWidget {
final String countPrice;
const PaymentScreenWallet(
{required this.iframeUrl, Key? key, required this.countPrice})
: super(key: key);
{required this.iframeUrl, super.key, required this.countPrice});
@override
State<PaymentScreenWallet> createState() => _PaymentScreenWalletState();
@@ -472,7 +468,7 @@ class _PaymentScreenWalletState extends State<PaymentScreenWallet> {
}
Future<void> _fetchPaymentStatus() async {
final String userId = '+963' + box.read(BoxName.phoneWallet);
final String userId = '+963${box.read(BoxName.phoneWallet)}';
await Future.delayed(const Duration(seconds: 2));
try {