25-1/13/1-securejordan
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../controller/auth/captin/invit_controller.dart';
|
||||
import '../../../controller/functions/encrypt_decrypt.dart';
|
||||
|
||||
class InviteScreen extends StatelessWidget {
|
||||
final InviteController controller = Get.put(InviteController());
|
||||
@@ -367,8 +368,9 @@ class InviteScreen extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildInvitationItem(BuildContext context, int index) {
|
||||
int countOfInvitDriver = int.tryParse(controller.driverInvitationData[index]
|
||||
['countOfInvitDriver']
|
||||
int countOfInvitDriver = int.tryParse(encryptionHelper
|
||||
.decryptData(controller.driverInvitationData[index]
|
||||
['countOfInvitDriver'])
|
||||
?.toString() ??
|
||||
'0') ??
|
||||
0;
|
||||
@@ -389,7 +391,8 @@ class InviteScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
controller.driverInvitationData[index]['invitorName'],
|
||||
encryptionHelper.decryptData(
|
||||
controller.driverInvitationData[index]['invitorName']),
|
||||
style: const TextStyle(
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -425,8 +428,11 @@ class InviteScreen extends StatelessWidget {
|
||||
// Extracting the data from the sample JSON-like structure
|
||||
var invitation = controller.driverInvitationDataToPassengers[index];
|
||||
|
||||
int countOfInvitDriver =
|
||||
int.tryParse(invitation['countOfInvitDriver']?.toString() ?? '0') ?? 0;
|
||||
int countOfInvitDriver = int.tryParse(encryptionHelper
|
||||
.decryptData(invitation['countOfInvitDriver'])
|
||||
?.toString() ??
|
||||
'0') ??
|
||||
0;
|
||||
double progressValue = (countOfInvitDriver / 10.0).clamp(0.0, 1.0);
|
||||
|
||||
return GestureDetector(
|
||||
@@ -444,7 +450,8 @@ class InviteScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
invitation['passengerName']
|
||||
encryptionHelper
|
||||
.decryptData(invitation['passengerName'])
|
||||
.toString(), // Handle null or missing data
|
||||
style: const TextStyle(
|
||||
fontSize: 17,
|
||||
@@ -499,13 +506,17 @@ class InviteScreen extends StatelessWidget {
|
||||
_buildStatItem(
|
||||
context,
|
||||
"Total Invites".tr,
|
||||
controller.driverInvitationDataToPassengers[0]['countOfInvitDriver']
|
||||
encryptionHelper
|
||||
.decryptData(controller.driverInvitationDataToPassengers[0]
|
||||
['countOfInvitDriver'])
|
||||
.toString(),
|
||||
),
|
||||
_buildStatItem(
|
||||
context,
|
||||
"Active Users".tr,
|
||||
controller.driverInvitationDataToPassengers[0]['passengerName']
|
||||
encryptionHelper
|
||||
.decryptData(controller.driverInvitationDataToPassengers[0]
|
||||
['passengerName'])
|
||||
.toString(),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user