This commit is contained in:
Hamza-Ayed
2023-10-18 22:38:06 +03:00
parent 5cbd03f7d8
commit 805754a599
8 changed files with 208 additions and 17 deletions

View File

@@ -125,11 +125,13 @@ class HomeCaptain extends StatelessWidget {
builder: (homeCaptainController) => Column(
children: [
Text(
'Active Duration: ${homeCaptainController.activeDuration.inSeconds} seconds',
'Active Duration:'.tr +
' ${homeCaptainController.activeDuration.inSeconds} seconds',
style: const TextStyle(fontSize: 20),
),
Text(
'Total Duration: ${homeCaptainController.calculateTotalDuration()} seconds',
'Total Duration:'.tr +
' ${homeCaptainController.calculateTotalDuration()} seconds',
style: const TextStyle(fontSize: 20),
),
TextButton(

View File

@@ -107,7 +107,8 @@ class PassengerInfoWindow extends StatelessWidget {
launchCommunication(
'whatsapp',
controller.phone.toString(),
'Hello this is Captain ${box.read(BoxName.nameDriver)}');
'Hello this is Captain'.tr +
' ${box.read(BoxName.nameDriver)}');
},
icon: const Icon(
Icons.whatshot,
@@ -118,7 +119,8 @@ class PassengerInfoWindow extends StatelessWidget {
launchCommunication(
'sms',
controller.phone.toString(),
'Hello this is Captain ${box.read(BoxName.nameDriver)}');
'Hello this is Captain'.tr +
' ${box.read(BoxName.nameDriver)}');
},
icon: const Icon(
Icons.sms_rounded,
@@ -129,7 +131,8 @@ class PassengerInfoWindow extends StatelessWidget {
launchCommunication(
'email',
controller.phone.toString(),
'Hello this is Captain ${box.read(BoxName.nameDriver)}');
'Hello this is Captain'.tr +
' ${box.read(BoxName.nameDriver)}');
},
icon: const Icon(
Icons.email,

View File

@@ -124,7 +124,8 @@ class RideBeginPassenger extends StatelessWidget {
validator: (value) {
if (value!.isEmpty ||
value.length < 10) {
return 'Please enter a phone number';
return 'Please enter a phone number'
.tr;
}
// Add additional validation if needed
return null;

View File

@@ -63,7 +63,7 @@ class TimerToPassengerFromDriver extends StatelessWidget {
),
controller.remainingTimeToPassengerFromDriverAfterApplied < 60
? MyElevatedButton(
title: 'If you in Car Now. Press Start The Ride',
title: 'If you in Car Now. Press Start The Ride'.tr,
onPressed: () async {
//todo start the trip and rest all counter ,start new counter of the trip time

View File

@@ -62,12 +62,14 @@ class PassengerWallet extends StatelessWidget {
child:
box.read(BoxName.passengerWalletTotal) == null
? Text(
'You Dont Have Any amount in ${AppInfo.appName} Wallet!'
.tr,
'You Dont Have Any amount in'.tr +
' ${AppInfo.appName}' +
'Wallet!'.tr,
style: AppStyle.title,
)
: Text(
'You Have ${box.read(BoxName.passengerWalletTotal).toString()} JD in ${AppInfo.appName} Wallet',
'You Have'.tr +
' ${box.read(BoxName.passengerWalletTotal).toString()} JD in ${AppInfo.appName} Wallet',
style: AppStyle.title,
),
),
@@ -194,7 +196,7 @@ class PassengerWallet extends StatelessWidget {
left: Get.width * .3,
right: Get.width * .3,
child: MyElevatedButton(
title: 'Show Promos',
title: 'Show Promos'.tr,
onPressed: () {
controller.changePromoSheetDialogue();
},
@@ -313,7 +315,7 @@ class PassengerWallet extends StatelessWidget {
)),
const Spacer(),
MyElevatedButton(
title: 'Pay with Your PayPal',
title: 'Pay with Your PayPal'.tr,
onPressed: () {
if (controller.selectedAmount != 0) {
print(controller.selectedAmount);
@@ -489,7 +491,7 @@ class PassengerWallet extends StatelessWidget {
},
),
MyElevatedButton(
title: 'Cancel',
title: 'Cancel'.tr,
kolor: AppColor.redColor,
onPressed: () {
controller.changePromoSheetDialogue();