This commit is contained in:
Hamza Aleghwairyeen
2024-04-22 14:19:38 +03:00
parent 3a0ca74961
commit b9c9a8a12f
10 changed files with 113 additions and 60 deletions

View File

@@ -8,9 +8,6 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
import '../../../../../constant/box_name.dart';
import '../../../../../main.dart';
class CallPage extends StatelessWidget {
const CallPage({super.key});
@@ -33,10 +30,13 @@ GetBuilder<HomeCaptainController> callPage() {
padding: const EdgeInsets.all(15),
child: Container(
decoration: AppStyle.boxDecoration1,
child: Text(
'No SIM card, no problem! Call your driver directly through our app. We use advanced technology to ensure your privacy.'
.tr,
style: AppStyle.title,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'No SIM card, no problem! Call your driver directly through our app. We use advanced technology to ensure your privacy.'
.tr,
style: AppStyle.title,
),
),
),
),

View File

@@ -1,4 +1,6 @@
import 'package:SEFER/controller/functions/tts.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:SEFER/controller/home/payment/captain_wallet_controller.dart';
@@ -36,12 +38,33 @@ class ConnectWidget extends StatelessWidget {
? 'You dont have Points'.tr
: 'You Are Stopped For this Day !'.tr,
titleStyle: AppStyle.title,
content: Text(
double.parse(captainWalletController.totalPoints) < -300
? 'You must be recharge your Account'.tr
: 'You Refused 3 Rides this Day that is the reason \nSee you Tomorrow!'
.tr,
style: AppStyle.title,
content: Column(
children: [
IconButton(
onPressed: () async {
double.parse(
captainWalletController.totalPoints) <
-300
? await Get.find<TextToSpeechController>()
.speakText(
'You must be recharge your Account'
.tr)
: await Get.find<TextToSpeechController>()
.speakText(
'You Refused 3 Rides this Day that is the reason \nSee you Tomorrow!'
.tr);
},
icon: const Icon(Icons.headphones),
),
Text(
double.parse(captainWalletController.totalPoints) <
-300
? 'You must be recharge your Account'.tr
: 'You Refused 3 Rides this Day that is the reason \nSee you Tomorrow!'
.tr,
style: AppStyle.title,
),
],
),
confirm:
double.parse(captainWalletController.totalPoints) <
@@ -60,7 +83,10 @@ class ConnectWidget extends StatelessWidget {
}));
},
color: CupertinoColors.destructiveRed,
child: Text('You are Stopped'.tr),
child: Text(
'You are Stopped'.tr,
style: AppStyle.title,
),
)
: CupertinoButton(
onPressed: homeCaptainController.onButtonSelected,