added zwg support

This commit is contained in:
Prince
2026-06-17 14:42:46 +02:00
parent cc4b02f3c9
commit 64eaa38079
12 changed files with 324 additions and 247 deletions

View File

@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
@@ -6,11 +7,14 @@ import 'package:flutter_contacts/flutter_contacts.dart';
import 'package:go_router/go_router.dart';
import 'package:provider/provider.dart';
import 'package:qpay/models/responsive_policy.dart';
import 'package:qpay/models/user_model.dart';
import 'package:qpay/screens/transaction_controller.dart';
import 'package:skeletonizer/skeletonizer.dart';
import 'package:qpay/screens/recipient/recipients_controller.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../onboarding/auth_provider.dart';
class RecipientsScreen extends StatefulWidget {
const RecipientsScreen({super.key});
@@ -66,6 +70,16 @@ class _RecipientsScreenState extends State<RecipientsScreen>
controller.getRecipients(_queryParams);
}
Future<UserModel?> getAuthenticatedUser() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
String? userModelString = prefs.getString("userModel");
if (userModelString != null) {
Map<String, dynamic> userModelJson = jsonDecode(userModelString);
return UserModel.fromJson(userModelJson);
}
return null;
}
@override
void dispose() {
_animationController.dispose();
@@ -577,7 +591,7 @@ class _RecipientsScreenState extends State<RecipientsScreen>
),
const SizedBox(width: 8),
Text(
"TRANSACTION DETAILS",
"PROVIDER DETAILS",
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w700,
@@ -592,12 +606,18 @@ class _RecipientsScreenState extends State<RecipientsScreen>
const SizedBox(height: 16),
if (children != null)
...children
else
else ...[
_buildDetailRow(
icon: Icons.business_outlined,
label: label,
value: value ?? '',
),
_buildDetailRow(
icon: Icons.monetization_on,
label: "Currency",
value: transactionController.model.currency,
),
],
],
),
),