4/4/3
This commit is contained in:
@@ -21,75 +21,85 @@ class HistoryCaptain extends StatelessWidget {
|
||||
builder: (historyCaptainController) => historyCaptainController
|
||||
.isloading
|
||||
? const MyCircularProgressIndicator()
|
||||
: ListView.builder(
|
||||
itemCount:
|
||||
historyCaptainController.historyData['message'].length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var list = historyCaptainController.historyData['message']
|
||||
[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
list['status'] != 'Cancel'
|
||||
? historyCaptainController
|
||||
.getHistoryDetails(list['order_id'])
|
||||
: Get.defaultDialog(
|
||||
title: 'This Trip Cancelled'.tr,
|
||||
middleText: '',
|
||||
titleStyle: AppStyle.title,
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: () => Get.back()));
|
||||
},
|
||||
child: Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'OrderId'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
list['order_id'],
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'created time'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
list['created_at'],
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
list['status'],
|
||||
style: list['status'] == 'Apply'
|
||||
? AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor)
|
||||
: list['status'] == 'Refused'
|
||||
? AppStyle.title.copyWith(
|
||||
color: AppColor.redColor)
|
||||
: AppStyle.title.copyWith(
|
||||
color: AppColor.yellowColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
: historyCaptainController.historyData['message'].length < 1
|
||||
? Center(
|
||||
child: Text(
|
||||
'No ride Yet.'.tr,
|
||||
style: AppStyle.headTitle,
|
||||
),
|
||||
);
|
||||
},
|
||||
))
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: historyCaptainController
|
||||
.historyData['message'].length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var list = historyCaptainController
|
||||
.historyData['message'][index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
list['status'] != 'Cancel'
|
||||
? historyCaptainController
|
||||
.getHistoryDetails(list['order_id'])
|
||||
: Get.defaultDialog(
|
||||
title: 'This Trip Cancelled'.tr,
|
||||
middleText: '',
|
||||
titleStyle: AppStyle.title,
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: () => Get.back()));
|
||||
},
|
||||
child: Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'OrderId'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
list['order_id'],
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'created time'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
list['created_at'],
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
list['status'],
|
||||
style: list['status'] == 'Apply'
|
||||
? AppStyle.title.copyWith(
|
||||
color: AppColor.greenColor)
|
||||
: list['status'] == 'Refused'
|
||||
? AppStyle.title.copyWith(
|
||||
color: AppColor.redColor)
|
||||
: AppStyle.title.copyWith(
|
||||
color: AppColor.yellowColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
))
|
||||
],
|
||||
isleading: true,
|
||||
);
|
||||
|
||||
@@ -70,8 +70,9 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
Text(mapDriverController.price.toStringAsFixed(0)),
|
||||
],
|
||||
),
|
||||
mapDriverController.carType == 'Free Ride' ||
|
||||
mapDriverController.carType == 'Comfort'
|
||||
(mapDriverController.carType == 'Free Ride' ||
|
||||
mapDriverController.carType == 'Comfort') &&
|
||||
mapDriverController.remainingTimeTimerRideBegin > 60
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
||||
@@ -17,7 +17,7 @@ class NotificationCaptain extends StatelessWidget {
|
||||
body: [
|
||||
GetBuilder<NotificationCaptainController>(
|
||||
builder: (notificationCaptainController) =>
|
||||
notificationCaptainController.isloading
|
||||
notificationCaptainController.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: SafeArea(
|
||||
child: ListView.builder(
|
||||
|
||||
Reference in New Issue
Block a user