12/3/1
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/colors.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/controller/auth/captin/history_captain.dart';
|
||||
import 'package:ride/views/home/Captin/history/history_details_page.dart';
|
||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
import 'package:ride/views/widgets/my_scafold.dart';
|
||||
import 'package:ride/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../../../constant/colors.dart';
|
||||
import '../../../../constant/style.dart';
|
||||
import '../../../../controller/auth/captin/history_captain.dart';
|
||||
import '../../../widgets/elevated_btn.dart';
|
||||
import '../../../widgets/my_scafold.dart';
|
||||
import '../../../widgets/mycircular.dart';
|
||||
|
||||
class HistoryCaptain extends StatelessWidget {
|
||||
const HistoryCaptain({super.key});
|
||||
|
||||
@@ -41,7 +41,7 @@ class DrawerCaptain extends StatelessWidget {
|
||||
title: const Text('Wallet'),
|
||||
onTap: () {
|
||||
// Handle wallet item tap
|
||||
Get.to(() => const WaletCaptain(), transition: Transition.native);
|
||||
Get.to(() => WaletCaptain(), transition: Transition.native);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
@@ -76,7 +76,7 @@ class DrawerCaptain extends StatelessWidget {
|
||||
title: const Text('Helping Center'),
|
||||
onTap: () {
|
||||
// Handle helping center item tap
|
||||
Get.to(() => const HelpCaptain(), transition: Transition.size);
|
||||
Get.to(() => HelpCaptain(), transition: Transition.size);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
|
||||
@@ -1,15 +1,155 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/colors.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/controller/home/captin/help/help_controller.dart';
|
||||
import 'package:ride/views/home/Captin/home_captain/help_details_replay_page.dart';
|
||||
import 'package:ride/views/widgets/my_scafold.dart';
|
||||
|
||||
import '../../../widgets/elevated_btn.dart';
|
||||
import '../../../widgets/mycircular.dart';
|
||||
|
||||
class HelpCaptain extends StatelessWidget {
|
||||
const HelpCaptain({super.key});
|
||||
HelpCaptain({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(HelpController());
|
||||
return MyScafolld(
|
||||
title: 'Helping Page'.tr,
|
||||
body: [],
|
||||
body: [
|
||||
Positioned(
|
||||
top: Get.height * .025,
|
||||
right: 20,
|
||||
left: 20,
|
||||
child: Card(
|
||||
color: AppColor.yellowColor,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
'If you need any help or have question this is right site to do that and your welcome'
|
||||
.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: Get.height * .15,
|
||||
right: 20,
|
||||
left: 20,
|
||||
child: Card(
|
||||
elevation: 3,
|
||||
color: AppColor.secondaryColor,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: GetBuilder<HelpController>(
|
||||
builder: (helpController) => Form(
|
||||
key: helpController.formKey,
|
||||
child: Column(
|
||||
children: [
|
||||
TextFormField(
|
||||
controller: helpController.helpQuestionController,
|
||||
decoration: const InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
hintText: 'Enter your Question here',
|
||||
labelText: 'Question',
|
||||
),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter your Question.';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
helpController.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: MyElevatedButton(
|
||||
onPressed: () {
|
||||
if (helpController.formKey.currentState!
|
||||
.validate()) {
|
||||
helpController.addHelpQuestion();
|
||||
|
||||
// Clear the feedback form
|
||||
helpController.formKey.currentState!
|
||||
.reset();
|
||||
}
|
||||
},
|
||||
title: 'Submit Question'.tr,
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
)),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 3,
|
||||
right: 8,
|
||||
left: 8,
|
||||
child: GetBuilder<HelpController>(
|
||||
builder: (helpController) => Container(
|
||||
height: Get.height * .63,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: ListView.builder(
|
||||
itemCount:
|
||||
helpController.helpQuestionDate['message'].length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var list =
|
||||
helpController.helpQuestionDate['message'][index];
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(3),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: AppColor.greenColor,
|
||||
width: 3,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(11)),
|
||||
// elevation: 3,
|
||||
// color: AppColor.greenColor,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
print(list['id']);
|
||||
helpController.getindex(
|
||||
list['id'], list['helpQuestion']);
|
||||
helpController
|
||||
.getHelpRepley(list['id'].toString());
|
||||
Get.to(
|
||||
() => const HelpDetailsReplayPage(),
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(2),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: Get.width * .6,
|
||||
child: Text(
|
||||
list['helpQuestion'],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: Get.width * .3,
|
||||
child: Text(
|
||||
list['datecreated'],
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
)),
|
||||
)
|
||||
],
|
||||
isleading: true,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/colors.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../../../controller/home/captin/help/help_controller.dart';
|
||||
import '../../../widgets/my_scafold.dart';
|
||||
|
||||
class HelpDetailsReplayPage extends StatelessWidget {
|
||||
const HelpDetailsReplayPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.find<HelpController>();
|
||||
return GetBuilder<HelpController>(
|
||||
builder: (helpController) => MyScafolld(
|
||||
title: 'Help Details'.tr,
|
||||
body: [
|
||||
helpController.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Card(
|
||||
elevation: 3,
|
||||
child: Container(
|
||||
width: Get.width * .66,
|
||||
color: Colors.transparent,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
helpController.qustion,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Card(
|
||||
elevation: 3,
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
width: Get.width * .66,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: helpController.status ==
|
||||
'not yet' ||
|
||||
helpController
|
||||
.helpQuestionRepleyDate[
|
||||
'message']['replay']
|
||||
.toString() ==
|
||||
'not yet'
|
||||
? Text(
|
||||
'No Response yet.'.tr,
|
||||
style: AppStyle.title,
|
||||
)
|
||||
: Text(
|
||||
helpController
|
||||
.helpQuestionRepleyDate[
|
||||
'message']['replay']
|
||||
.toString(),
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
],
|
||||
)
|
||||
],
|
||||
isleading: true,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,6 @@ import '../../../../controller/home/captin/widget/connect.dart';
|
||||
import '../../../../controller/home/captin/widget/left_menu_map_captain.dart';
|
||||
import '../../../../main.dart';
|
||||
import '../../../widgets/circle_container.dart';
|
||||
import '../../../widgets/elevated_btn.dart';
|
||||
import '../text_scanner.dart';
|
||||
|
||||
class HomeCaptain extends StatelessWidget {
|
||||
HomeCaptain({super.key});
|
||||
|
||||
@@ -24,7 +24,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
? Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 6,
|
||||
bottom: 50,
|
||||
left: 8,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
@@ -37,33 +37,35 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
DefaultTextStyle(
|
||||
style: AppStyle.title,
|
||||
child: AnimatedTextKit(
|
||||
animatedTexts: [
|
||||
ScaleAnimatedText(
|
||||
'Go to passenger Location now'.tr,
|
||||
),
|
||||
WavyAnimatedText(
|
||||
'Go to passenger Location now'.tr),
|
||||
FlickerAnimatedText(
|
||||
'Go to passenger Location now'.tr),
|
||||
WavyAnimatedText(
|
||||
'Go to passenger Location now'.tr),
|
||||
],
|
||||
isRepeatingAnimation: true,
|
||||
onTap: () {
|
||||
// print("Tap Event");
|
||||
},
|
||||
),
|
||||
),
|
||||
style: AppStyle.title,
|
||||
child: Text(
|
||||
'Go to passenger Location now'.tr,
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
)
|
||||
// AnimatedTextKit(
|
||||
// animatedTexts: [
|
||||
// ScaleAnimatedText(
|
||||
// 'Go to passenger Location now'.tr,
|
||||
// ),
|
||||
// WavyAnimatedText(
|
||||
// 'Go to passenger Location now'.tr),
|
||||
// FlickerAnimatedText(
|
||||
// 'Go to passenger Location now'.tr),
|
||||
// WavyAnimatedText(
|
||||
// 'Go to passenger Location now'.tr),
|
||||
// ],
|
||||
// isRepeatingAnimation: true,
|
||||
// onTap: () {
|
||||
// // print("Tap Event");
|
||||
// },
|
||||
// ),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text('Duration of the Ride is '.tr,
|
||||
style: AppStyle.title),
|
||||
Text(
|
||||
controller.duration.toString() +
|
||||
' ' +
|
||||
'Minute'.tr,
|
||||
Text('${controller.duration} ${'Minute'.tr}',
|
||||
style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
@@ -72,7 +74,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
Text('Distance of the Ride is '.tr,
|
||||
style: AppStyle.title),
|
||||
Text(
|
||||
controller.distance.toString() + ' ' + 'KM'.tr,
|
||||
'${controller.distance} ${'KM'.tr}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
@@ -107,8 +109,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
launchCommunication(
|
||||
'whatsapp',
|
||||
controller.phone.toString(),
|
||||
'Hello this is Captain'.tr +
|
||||
' ${box.read(BoxName.nameDriver)}');
|
||||
'${'Hello this is Captain'.tr} ${box.read(BoxName.nameDriver)}');
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.whatshot,
|
||||
@@ -119,8 +120,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
launchCommunication(
|
||||
'sms',
|
||||
controller.phone.toString(),
|
||||
'Hello this is Captain'.tr +
|
||||
' ${box.read(BoxName.nameDriver)}');
|
||||
'${'Hello this is Captain'.tr} ${box.read(BoxName.nameDriver)}');
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.sms_rounded,
|
||||
@@ -131,8 +131,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
launchCommunication(
|
||||
'email',
|
||||
controller.phone.toString(),
|
||||
'Hello this is Captain'.tr +
|
||||
' ${box.read(BoxName.nameDriver)}');
|
||||
'${'Hello this is Captain'.tr} ${box.read(BoxName.nameDriver)}');
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.email,
|
||||
|
||||
@@ -204,7 +204,8 @@ class OrderRequestPage extends StatelessWidget {
|
||||
'driverId': myList[18].toString(),
|
||||
'durationOfRideValue': myList[19].toString(),
|
||||
'paymentAmount': myList[3].toString(),
|
||||
'paymentMethod': myList[13].toString(),
|
||||
'paymentMethod':
|
||||
myList[13].toString() == 'true' ? 'visa' : 'cash'
|
||||
});
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user