5/29/3
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
@@ -20,14 +21,17 @@ class HelpCaptain extends StatelessWidget {
|
||||
body: [
|
||||
Column(
|
||||
children: [
|
||||
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,
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -80,70 +84,84 @@ class HelpCaptain extends StatelessWidget {
|
||||
),
|
||||
)),
|
||||
GetBuilder<HelpController>(
|
||||
builder: (helpController) => Container(
|
||||
height: 400,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: ListView.builder(
|
||||
itemCount: helpController.helpQuestionDate['message'] !=
|
||||
null
|
||||
? helpController.helpQuestionDate['message'].length
|
||||
: 0,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
// if (helpController.helpQuestionDate['message'] ==
|
||||
// null) {
|
||||
// return const CircularProgressIndicator();
|
||||
// }
|
||||
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(),
|
||||
builder: (helpController) => Padding(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Container(
|
||||
height: Get.height * .45,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: ListView.builder(
|
||||
itemCount:
|
||||
helpController.helpQuestionDate['message'] != null
|
||||
? helpController
|
||||
.helpQuestionDate['message'].length
|
||||
: 0,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
// if (helpController.helpQuestionDate['message'] ==
|
||||
// null) {
|
||||
// return const CircularProgressIndicator();
|
||||
// }
|
||||
var list = helpController
|
||||
.helpQuestionDate['message'][index];
|
||||
return helpController
|
||||
.helpQuestionDate['message'].length ==
|
||||
0
|
||||
? Center(
|
||||
child: Text(
|
||||
'text',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
: 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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
},
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:SEFER/controller/payment/paymob.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
@@ -13,6 +12,7 @@ import '../../../../constant/table_names.dart';
|
||||
import '../../../../controller/functions/location_controller.dart';
|
||||
import '../../../../controller/home/captin/home_captain_controller.dart';
|
||||
import '../../../../controller/home/captin/order_request_controller.dart';
|
||||
import '../../../widgets/circle_container.dart';
|
||||
import 'widget/connect.dart';
|
||||
import 'widget/left_menu_map_captain.dart';
|
||||
import '../../../../controller/home/payment/captain_wallet_controller.dart';
|
||||
@@ -30,37 +30,26 @@ class HomeCaptain extends StatelessWidget {
|
||||
Get.put(HomeCaptainController());
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: AppColor.greenColor,
|
||||
elevation: 0,
|
||||
// backgroundColor: AppColor.accentColor,
|
||||
elevation: 1,
|
||||
title: Text('Home'.tr),
|
||||
actions: [
|
||||
GetBuilder<LocationController>(
|
||||
builder: (locationController) => locationController.isLoading
|
||||
? const SizedBox(
|
||||
height: 1,
|
||||
width: 1,
|
||||
child: CircularProgressIndicator.adaptive())
|
||||
: const SizedBox(),
|
||||
),
|
||||
GetBuilder<OrderRequestController>(
|
||||
builder: (orderRequestController) => MyCircleContainer(
|
||||
child: Text(
|
||||
orderRequestController.countRefuse.toString(),
|
||||
style: AppStyle.title,
|
||||
))),
|
||||
IconButton(
|
||||
// onPressed: () => box.remove(BoxName.periods),
|
||||
onPressed: () => sql.deleteAllData(TableName.driverOrdersRefuse),
|
||||
icon: const Icon(Icons.remove)),
|
||||
GetBuilder<OrderRequestController>(
|
||||
builder: (orderRequestController) => IconButton(
|
||||
onPressed: () =>
|
||||
orderRequestController.getRefusedOrderByCaptain(),
|
||||
icon: const Icon(Icons.get_app)),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
PaymobManager().getPaymentKey(100, 'EGP');
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.call,
|
||||
size: 29,
|
||||
),
|
||||
),
|
||||
// GetBuilder<OrderRequestController>(
|
||||
// builder: (orderRequestController) => IconButton(
|
||||
// onPressed: () =>
|
||||
// orderRequestController.getRefusedOrderByCaptain(),
|
||||
// icon: const Icon(Icons.get_app)),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
drawer: DrawerCaptain(),
|
||||
@@ -134,7 +123,7 @@ class HomeCaptain extends StatelessWidget {
|
||||
color: AppColor.yellowColor,
|
||||
),
|
||||
Text(
|
||||
'${' You Have in'.tr} ${AppInformation.appName} is ${homeCaptainController.totalMoneyInSEFER} ',
|
||||
'${' You Have in'.tr} ${AppInformation.appName} ${homeCaptainController.totalMoneyInSEFER} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
@@ -143,7 +132,7 @@ class HomeCaptain extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
'Total points is '.tr +
|
||||
'Total Budget is '.tr +
|
||||
Get.find<CaptainWalletController>().totalPoints,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -13,43 +15,43 @@ import '../../../../../controller/functions/location_controller.dart';
|
||||
GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
return GetBuilder<HomeCaptainController>(
|
||||
builder: (controller) => Positioned(
|
||||
bottom: Get.height * .17,
|
||||
bottom: Get.height * .2,
|
||||
left: 6,
|
||||
child: Column(
|
||||
children: [
|
||||
AnimatedContainer(
|
||||
duration: const Duration(microseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(),
|
||||
color: AppColor.secondaryColor,
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
AC credentials = AC();
|
||||
String apiKey = '21010e54b50f41a4904708c526e102df';
|
||||
String convertedStringN = credentials.c(
|
||||
credentials.c(credentials.c(apiKey, cs), cC), cn);
|
||||
print('Converted v: $convertedStringN');
|
||||
// AnimatedContainer(
|
||||
// duration: const Duration(microseconds: 200),
|
||||
// width: controller.widthMapTypeAndTraffic,
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border.all(),
|
||||
// color: AppColor.secondaryColor,
|
||||
// borderRadius: BorderRadius.circular(15)),
|
||||
// child: IconButton(
|
||||
// onPressed: () {
|
||||
// AC credentials = AC();
|
||||
// String apiKey = '21010e54b50f41a4904708c526e102df';
|
||||
// String convertedStringN = credentials.c(
|
||||
// credentials.c(credentials.c(apiKey, cs), cC), cn);
|
||||
// print('Converted v: $convertedStringN');
|
||||
|
||||
String retrievedStringS = credentials.r(
|
||||
credentials.r(credentials.r(convertedStringN, cn), cC),
|
||||
cs);
|
||||
print('Retrieved String: $retrievedStringS');
|
||||
//
|
||||
if (retrievedStringS == apiKey) {
|
||||
print('same');
|
||||
}
|
||||
},
|
||||
icon: const Icon(
|
||||
FontAwesome.map_signs,
|
||||
size: 24,
|
||||
color: Colors.black,
|
||||
)),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
// String retrievedStringS = credentials.r(
|
||||
// credentials.r(credentials.r(convertedStringN, cn), cC),
|
||||
// cs);
|
||||
// print('Retrieved String: $retrievedStringS');
|
||||
// //
|
||||
// if (retrievedStringS == apiKey) {
|
||||
// print('same');
|
||||
// }
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome.map_signs,
|
||||
// size: 24,
|
||||
// color: Colors.black,
|
||||
// )),
|
||||
// ),
|
||||
// const SizedBox(
|
||||
// height: 5,
|
||||
// ),
|
||||
AnimatedContainer(
|
||||
duration: const Duration(microseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
@@ -113,6 +115,9 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
AnimatedContainer(
|
||||
duration: const Duration(microseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
@@ -122,7 +127,25 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
Get.to(() => RideCalculateDriver());
|
||||
final now = DateTime.now();
|
||||
DateTime? lastRequestTime =
|
||||
box.read(BoxName.lastTimeStaticThrottle);
|
||||
|
||||
if (lastRequestTime == null ||
|
||||
now.difference(lastRequestTime).inMinutes >= 15) {
|
||||
// Update the last request time to now
|
||||
lastRequestTime = now;
|
||||
box.write(BoxName.lastTimeStaticThrottle, lastRequestTime);
|
||||
// Navigate to the RideCalculateDriver page
|
||||
Get.to(() => RideCalculateDriver());
|
||||
} else {
|
||||
// Optionally show a message or handle the throttling case
|
||||
final minutesLeft =
|
||||
15 - now.difference(lastRequestTime).inMinutes;
|
||||
Get.snackbar(
|
||||
'Please wait $minutesLeft minutes before trying again.',
|
||||
'');
|
||||
}
|
||||
},
|
||||
icon: const Icon(FontAwesome5.chart_bar),
|
||||
),
|
||||
|
||||
@@ -47,8 +47,8 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
const Icon(Icons.timelapse),
|
||||
Text(
|
||||
mapDriverController.hours > 1
|
||||
? '${'${'Your Ride Duration is '.tr}${mapDriverController.hours}${' H and'.tr}'} ${mapDriverController.minutes} m'
|
||||
: '${'Your Ride Duration is '.tr} ${mapDriverController.minutes} ${'m'.tr}',
|
||||
? '${'${mapDriverController.hours}${' H and'.tr}'} ${mapDriverController.minutes} m'
|
||||
: '${mapDriverController.minutes} ${'m'.tr}',
|
||||
style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
@@ -148,18 +148,20 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
)
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
? Row(
|
||||
: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title: 'End Ride'.tr,
|
||||
onPressed: () {
|
||||
mapDriverController.finishRideFromDriver();
|
||||
},
|
||||
kolor: AppColor.redColor,
|
||||
),
|
||||
mapDriverController.remainingTimeTimerRideBegin <
|
||||
60
|
||||
? MyElevatedButton(
|
||||
title: 'End Ride'.tr,
|
||||
onPressed: () {
|
||||
mapDriverController
|
||||
.finishRideFromDriver();
|
||||
},
|
||||
kolor: AppColor.redColor,
|
||||
)
|
||||
: const SizedBox(),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
@@ -168,8 +170,7 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
),
|
||||
mapDriverController.carType != 'Comfort' &&
|
||||
mapDriverController.carType != 'Mashwari'
|
||||
? Stack(
|
||||
|
||||
@@ -92,7 +92,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
// SizedBox(height: 200, child: Text(pointsList.toString())),
|
||||
// Text(message.notification!.body.toString()),
|
||||
SizedBox(
|
||||
height: Get.height * .2,
|
||||
height: Get.height * .3,
|
||||
child: GoogleMap(
|
||||
initialCameraPosition: CameraPosition(
|
||||
zoom: 12,
|
||||
@@ -357,11 +357,13 @@ class OrderRequestPage extends StatelessWidget {
|
||||
'step2': myList[23].toString(),
|
||||
'step3': myList[24].toString(),
|
||||
'step4': myList[25].toString(),
|
||||
'passengerWalletBurc': myList[26].toString(),
|
||||
'passengerWalletBurc': myList[27].toString(),
|
||||
'timeOfOrder': DateTime.now().toString(),
|
||||
'totalPassenger': myList[2].toString(),
|
||||
'carType': myList[31].toString(),
|
||||
'kazan': myList[32].toString(),
|
||||
'startNameLocation': myList[29].toString(),
|
||||
'endNameLocation': myList[30].toString(),
|
||||
});
|
||||
},
|
||||
),
|
||||
|
||||
@@ -34,6 +34,10 @@ class PointsCaptain extends StatelessWidget {
|
||||
titleStyle: AppStyle.title,
|
||||
content: Column(
|
||||
children: [
|
||||
Text(
|
||||
'${'you can buy '.tr}$countPoint ${'LE'.tr}${'by '.tr}${'$pricePoint'.tr}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: '💳 Pay with Credit Card'.tr,
|
||||
onPressed: () async {
|
||||
@@ -55,7 +59,7 @@ class PointsCaptain extends StatelessWidget {
|
||||
),
|
||||
// Add some spacing between buttons
|
||||
MyElevatedButton(
|
||||
kolor: AppColor.yellowColor,
|
||||
kolor: AppColor.redColor,
|
||||
title: '💰 Pay with Wallet'.tr,
|
||||
onPressed: () async {
|
||||
Get.back();
|
||||
@@ -86,30 +90,34 @@ class PointsCaptain extends StatelessWidget {
|
||||
await captainWalletController.getCaptainWalletFromBuyPoints();
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
width: Get.width * .22,
|
||||
height: Get.width * .15,
|
||||
margin: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
color: kolor,
|
||||
border: Border.all(color: AppColor.accentColor),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'$countPoint ${'Point'.tr}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
Text(
|
||||
'$pricePoint ${box.read(BoxName.countryCode) == 'Jordan' ? 'JOD'.tr : 'LE'.tr}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 3, vertical: 8),
|
||||
child: Container(
|
||||
width: Get.width * .22,
|
||||
height: Get.width * .22,
|
||||
margin: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
color: kolor,
|
||||
border: Border.all(color: AppColor.accentColor),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
)),
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'$countPoint ${'Point'.tr}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
Text(
|
||||
'$pricePoint ${box.read(BoxName.countryCode) == 'Jordan' ? 'JOD'.tr : 'LE'.tr}',
|
||||
style: AppStyle.title,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:SEFER/controller/functions/tts.dart';
|
||||
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
||||
import 'package:SEFER/views/home/my_wallet/payment_history_driver_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -14,8 +15,10 @@ import 'package:SEFER/views/widgets/my_textField.dart';
|
||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
import 'package:path/path.dart';
|
||||
|
||||
import '../../../controller/payment/driver_payment_controller.dart';
|
||||
import '../../widgets/my_scafold.dart';
|
||||
import 'points_captain.dart';
|
||||
import 'weekly_payment_page.dart';
|
||||
|
||||
class WalletCaptain extends StatelessWidget {
|
||||
WalletCaptain({super.key});
|
||||
@@ -23,7 +26,7 @@ class WalletCaptain extends StatelessWidget {
|
||||
Get.put(CaptainWalletController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Get.put(MapPassengerController());
|
||||
Get.put(MapDriverController()).totalPassenger = '0';
|
||||
return MyScafolld(
|
||||
title: 'Driver Wallet'.tr,
|
||||
body: [
|
||||
@@ -38,20 +41,20 @@ class WalletCaptain extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration.copyWith(
|
||||
color: double.parse(captainWalletController
|
||||
.totalPoints) <
|
||||
0 &&
|
||||
double.parse(captainWalletController
|
||||
.totalPoints) >
|
||||
-300
|
||||
? AppColor.yellowColor
|
||||
: double.parse(captainWalletController
|
||||
.totalPoints) <
|
||||
-300
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
),
|
||||
// decoration: AppStyle.boxDecoration1.copyWith(
|
||||
color: double.parse(
|
||||
captainWalletController.totalPoints) <
|
||||
0 &&
|
||||
double.parse(
|
||||
captainWalletController.totalPoints) >
|
||||
-300
|
||||
? AppColor.yellowColor
|
||||
: double.parse(
|
||||
captainWalletController.totalPoints) <
|
||||
-300
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
// ),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.snackbar(
|
||||
@@ -69,6 +72,7 @@ class WalletCaptain extends StatelessWidget {
|
||||
child: Text(
|
||||
'${'Total Points is'.tr} ${captainWalletController.totalPoints.toString()} 💎',
|
||||
style: AppStyle.headTitle2,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -111,8 +115,8 @@ class WalletCaptain extends StatelessWidget {
|
||||
Get.snackbar(
|
||||
icon: InkWell(
|
||||
onTap: () async {
|
||||
await Get.find<
|
||||
TextToSpeechController>()
|
||||
await Get.put(
|
||||
TextToSpeechController())
|
||||
.speakText(
|
||||
'This amount for all trip I get from Passengers'
|
||||
.tr);
|
||||
@@ -255,86 +259,89 @@ class WalletCaptain extends StatelessWidget {
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'You can buy Points to let you online\nby this list below'
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const Divider(
|
||||
indent: 30,
|
||||
endIndent: 30,
|
||||
color: AppColor.accentColor,
|
||||
thickness: 3,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
height: Get.height * .1,
|
||||
child: ListView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: [
|
||||
PointsCaptain(
|
||||
kolor: AppColor.blueColor,
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? 5
|
||||
: 100,
|
||||
countPoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '300'
|
||||
: '100',
|
||||
),
|
||||
PointsCaptain(
|
||||
kolor: Colors.green,
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? 10
|
||||
: 200,
|
||||
countPoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '1040'
|
||||
: '210',
|
||||
),
|
||||
PointsCaptain(
|
||||
kolor: Colors.amberAccent,
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? 22
|
||||
: 400,
|
||||
countPoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '2300'
|
||||
: '450',
|
||||
),
|
||||
PointsCaptain(
|
||||
kolor: AppColor.yellowColor,
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? 50
|
||||
: 1000,
|
||||
countPoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '55000'
|
||||
: '1200',
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'You can buy Points to let you online\nby this list below'
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const Divider(
|
||||
indent: 30,
|
||||
endIndent: 30,
|
||||
color: AppColor.accentColor,
|
||||
thickness: 3,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
height: Get.height * .19,
|
||||
child: ListView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: [
|
||||
PointsCaptain(
|
||||
kolor: AppColor.blueColor,
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? 5
|
||||
: 100,
|
||||
countPoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '300'
|
||||
: '100',
|
||||
),
|
||||
PointsCaptain(
|
||||
kolor: Colors.green,
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? 10
|
||||
: 200,
|
||||
countPoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '1040'
|
||||
: '210',
|
||||
),
|
||||
PointsCaptain(
|
||||
kolor: Colors.amberAccent,
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? 22
|
||||
: 400,
|
||||
countPoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '2300'
|
||||
: '450',
|
||||
),
|
||||
PointsCaptain(
|
||||
kolor: AppColor.yellowColor,
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? 50
|
||||
: 1000,
|
||||
countPoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '55000'
|
||||
: '1200',
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
@@ -362,17 +369,30 @@ class WalletCaptain extends StatelessWidget {
|
||||
height: 30,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
kolor: AppColor.blueColor,
|
||||
title: 'Payment History'.tr,
|
||||
onPressed: () {
|
||||
onPressed: () async {
|
||||
await Get.put(DriverWalletHistoryController())
|
||||
.getArchivePayment();
|
||||
Get.to(() => const PaymentHistoryDriverPage(),
|
||||
transition: Transition.size);
|
||||
},
|
||||
),
|
||||
MyElevatedButton(
|
||||
kolor: AppColor.blueColor,
|
||||
title: 'Weekly Budget'.tr,
|
||||
onPressed: () async {
|
||||
await Get.put(DriverWalletHistoryController())
|
||||
.getWeekllyArchivePayment();
|
||||
Get.to(() => const WeeklyPaymentPage(),
|
||||
transition: Transition.size);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
96
lib/views/home/my_wallet/weekly_payment_page.dart
Normal file
96
lib/views/home/my_wallet/weekly_payment_page.dart
Normal file
@@ -0,0 +1,96 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../../controller/payment/driver_payment_controller.dart';
|
||||
|
||||
class WeeklyPaymentPage extends StatelessWidget {
|
||||
const WeeklyPaymentPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(DriverWalletHistoryController());
|
||||
return MyScafolld(
|
||||
title: 'Payment History'.tr,
|
||||
body: [
|
||||
GetBuilder<DriverWalletHistoryController>(
|
||||
builder: (controller) => controller.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: Get.width * .8,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
controller.weeklyList[0]['totalAmount']
|
||||
.toString(),
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
' Total weekly points is '.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
SizedBox(
|
||||
height: Get.height * .8,
|
||||
child: ListView.builder(
|
||||
itemCount: controller.weeklyList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var list = controller.weeklyList[index];
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
list['amount'],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
list['dateUpdated'],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Card(
|
||||
elevation: 2,
|
||||
color: list['paymentMethod'] == 'visa'
|
||||
? AppColor.blueColor
|
||||
: AppColor.secondaryColor,
|
||||
child: Text(
|
||||
list['paymentMethod'],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
isleading: true);
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,10 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/profile/captain_profile_controller.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
|
||||
import '../../../constant/api_key.dart';
|
||||
import '../../widgets/my_textField.dart';
|
||||
|
||||
class ProfileCaptain extends StatelessWidget {
|
||||
const ProfileCaptain({super.key});
|
||||
|
||||
@@ -18,140 +12,332 @@ class ProfileCaptain extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(CaptainProfileController());
|
||||
return MyScafolld(
|
||||
title: 'My Profile'.tr,
|
||||
body: [
|
||||
GetBuilder<CaptainProfileController>(
|
||||
builder: (controller) => Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Center(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: Get.width * 0.26,
|
||||
backgroundColor: Colors.white,
|
||||
backgroundImage: CachedNetworkImageProvider(
|
||||
'${AK.serverPHP}/portrate_captain_image/${box.read(BoxName.driverID)}.jpg',
|
||||
),
|
||||
title: 'My Profile'.tr,
|
||||
body: [
|
||||
GetBuilder<CaptainProfileController>(
|
||||
builder: (controller) => Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Center(
|
||||
child: controller.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: DriverProfileCard(
|
||||
driverId:
|
||||
controller.captainProfileData['driverID'] ?? '',
|
||||
name: controller.captainProfileData['first_name'] +
|
||||
' ' +
|
||||
(controller.captainProfileData['last_name'] ?? ''),
|
||||
phoneNumber:
|
||||
controller.captainProfileData['phone'] ?? '',
|
||||
email: controller.captainProfileData['email'] ?? '',
|
||||
birthdate:
|
||||
controller.captainProfileData['birthdate'] ?? '',
|
||||
gender: controller.captainProfileData['gender'] ?? '',
|
||||
education:
|
||||
controller.captainProfileData['education'] ?? '',
|
||||
carMake: controller.captainProfileData['make'] ?? '',
|
||||
carModel: controller.captainProfileData['model'] ?? '',
|
||||
carPlate:
|
||||
controller.captainProfileData['car_plate'] ?? '',
|
||||
carColor: controller.captainProfileData['color'] ?? '',
|
||||
vin: controller.captainProfileData['vin'] ?? '',
|
||||
registrationDate: controller
|
||||
.captainProfileData['registration_date'] ??
|
||||
'',
|
||||
expirationDate:
|
||||
controller.captainProfileData['expiration_date'] ??
|
||||
'',
|
||||
ratingCount:
|
||||
controller.captainProfileData['ratingCount'] ?? 0,
|
||||
ratingDriver:
|
||||
controller.captainProfileData['ratingDriver'] !=
|
||||
null
|
||||
? double.tryParse(controller
|
||||
.captainProfileData['ratingDriver']
|
||||
.toString()) ??
|
||||
0
|
||||
: null,
|
||||
age: controller.captainProfileData['age'] ?? 0,
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
box.read(BoxName.nameDriver) +
|
||||
' ' +
|
||||
box.read(BoxName.lastNameDriver).toString(),
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
Text('${'Email is'.tr} :${box.read(BoxName.emailDriver)}',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Phone Number is'.tr} :${box.read(BoxName.phoneDriver)}',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Date of Birth is'.tr} :${box.read(BoxName.dobDriver)}',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
Text('${'Sex is '.tr}:${box.read(BoxName.sexDriver)}',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
const Divider(
|
||||
// height: 2,
|
||||
endIndent: 1,
|
||||
indent: 2,
|
||||
thickness: 2,
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text('Car Details'.tr, style: AppStyle.headTitle2),
|
||||
const SizedBox(height: 8.0),
|
||||
Text('${'VIN is'.tr} :${box.read(BoxName.vin)}',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
Text('${'Color is '.tr} :${box.read(BoxName.color)}',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Car Plate is '.tr} :${box.read(BoxName.carPlate)}',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
Text('${'Make is '.tr}:${box.read(BoxName.make)}',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
Text('${'Model is'.tr} :${box.read(BoxName.model)}',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
Text('${'Year is'.tr} :${box.read(BoxName.year)}',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Expiration Date '.tr} :${box.read(BoxName.expirationDate)}',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 8.0),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
isleading: true,
|
||||
action: GetBuilder<CaptainProfileController>(
|
||||
builder: (controller) => IconButton(
|
||||
onPressed: () {
|
||||
Get.defaultDialog(
|
||||
title: 'Edit Your data'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
content: SizedBox(
|
||||
height: Get.height * .4,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
MyTextForm(
|
||||
controller: controller.vin,
|
||||
hint: 'write vin for your car'.tr,
|
||||
label: 'VIN'.tr,
|
||||
type: TextInputType.emailAddress,
|
||||
),
|
||||
MyTextForm(
|
||||
controller: controller.color,
|
||||
hint: 'write Color for your car'.tr,
|
||||
label: 'Color'.tr,
|
||||
type: TextInputType.emailAddress,
|
||||
),
|
||||
MyTextForm(
|
||||
controller: controller.make,
|
||||
hint: 'write Make for your car'.tr,
|
||||
label: 'Make'.tr,
|
||||
type: TextInputType.emailAddress,
|
||||
),
|
||||
MyTextForm(
|
||||
controller: controller.model,
|
||||
hint: 'write Model for your car'.tr,
|
||||
label: 'Model'.tr,
|
||||
type: TextInputType.emailAddress,
|
||||
),
|
||||
MyTextForm(
|
||||
controller: controller.year,
|
||||
hint: 'write Year for your car'.tr,
|
||||
label: 'Year'.tr,
|
||||
type: TextInputType.number,
|
||||
),
|
||||
MyTextForm(
|
||||
controller: controller.expirationDate,
|
||||
hint: 'write Expiration Date for your car'.tr,
|
||||
label: 'Expiration Date'.tr,
|
||||
type: TextInputType.datetime),
|
||||
MyElevatedButton(
|
||||
title: 'Update'.tr,
|
||||
onPressed: () => controller.updateFields())
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
},
|
||||
icon: const Icon(Icons.edit),
|
||||
),
|
||||
));
|
||||
)
|
||||
],
|
||||
isleading: true,
|
||||
// action: GetBuilder<CaptainProfileController>(
|
||||
// builder: (controller) => IconButton(
|
||||
// onPressed: () {
|
||||
// Get.defaultDialog(
|
||||
// title: 'Edit Your data'.tr,
|
||||
// titleStyle: AppStyle.title,
|
||||
// content: SizedBox(
|
||||
// height: Get.height * .4,
|
||||
// child: SingleChildScrollView(
|
||||
// child: Column(
|
||||
// children: [
|
||||
// MyTextForm(
|
||||
// controller: controller.vin,
|
||||
// hint: 'write vin for your car'.tr,
|
||||
// label: 'VIN'.tr,
|
||||
// type: TextInputType.emailAddress,
|
||||
// ),
|
||||
// MyTextForm(
|
||||
// controller: controller.color,
|
||||
// hint: 'write Color for your car'.tr,
|
||||
// label: 'Color'.tr,
|
||||
// type: TextInputType.emailAddress,
|
||||
// ),
|
||||
// MyTextForm(
|
||||
// controller: controller.make,
|
||||
// hint: 'write Make for your car'.tr,
|
||||
// label: 'Make'.tr,
|
||||
// type: TextInputType.emailAddress,
|
||||
// ),
|
||||
// MyTextForm(
|
||||
// controller: controller.model,
|
||||
// hint: 'write Model for your car'.tr,
|
||||
// label: 'Model'.tr,
|
||||
// type: TextInputType.emailAddress,
|
||||
// ),
|
||||
// MyTextForm(
|
||||
// controller: controller.year,
|
||||
// hint: 'write Year for your car'.tr,
|
||||
// label: 'Year'.tr,
|
||||
// type: TextInputType.number,
|
||||
// ),
|
||||
// MyTextForm(
|
||||
// controller: controller.expirationDate,
|
||||
// hint: 'write Expiration Date for your car'.tr,
|
||||
// label: 'Expiration Date'.tr,
|
||||
// type: TextInputType.datetime),
|
||||
// MyElevatedButton(
|
||||
// title: 'Update'.tr,
|
||||
// onPressed: () => controller.updateFields())
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ));
|
||||
// },
|
||||
// icon: const Icon(Icons.edit),
|
||||
// ),
|
||||
// )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class DriverProfileCard extends StatelessWidget {
|
||||
final String driverId;
|
||||
final String name;
|
||||
final String phoneNumber;
|
||||
final String email;
|
||||
final String birthdate;
|
||||
final String gender;
|
||||
final String education;
|
||||
final String carMake;
|
||||
final String carModel;
|
||||
final String carPlate;
|
||||
final String carColor;
|
||||
final String vin;
|
||||
final String registrationDate;
|
||||
final String expirationDate;
|
||||
final int ratingCount;
|
||||
final double? ratingDriver;
|
||||
final int age;
|
||||
|
||||
DriverProfileCard({
|
||||
required this.driverId,
|
||||
required this.name,
|
||||
required this.phoneNumber,
|
||||
required this.email,
|
||||
required this.birthdate,
|
||||
required this.gender,
|
||||
required this.education,
|
||||
required this.carMake,
|
||||
required this.carModel,
|
||||
required this.carPlate,
|
||||
required this.carColor,
|
||||
required this.vin,
|
||||
required this.registrationDate,
|
||||
required this.expirationDate,
|
||||
required this.ratingCount,
|
||||
required this.ratingDriver,
|
||||
required this.age,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
elevation: 8,
|
||||
margin: const EdgeInsets.all(16),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
name,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.phone),
|
||||
const SizedBox(width: 8),
|
||||
Text(style: AppStyle.title, phoneNumber),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.calendar_today),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'birthdate'.tr} : $birthdate',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.wc),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'gender'.tr} : $gender',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.school),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'education'.tr} : $education',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.car_repair),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'Make'.tr} : $carMake',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.model_training),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'car_model'.tr} : $carModel',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.drive_eta),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'car_plate'.tr} : $carPlate',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.color_lens),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'car_color'.tr} : $carColor',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.confirmation_number),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'vin'.tr} : $vin',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.calendar_today),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'registration_date'.tr} : $registrationDate',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.calendar_today),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'expiration_date'.tr} : $expirationDate',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.star),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'rating_count'.tr} : $ratingCount',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.star_rate),
|
||||
const SizedBox(width: 8),
|
||||
ratingDriver != null
|
||||
? Text(
|
||||
style: AppStyle.title,
|
||||
'${'rating_driver'.tr} : $ratingDriver',
|
||||
)
|
||||
: Text(
|
||||
style: AppStyle.title,
|
||||
'${'rating_driver'.tr} : 0',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.person),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
style: AppStyle.title,
|
||||
'${'age'.tr} : $age',
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user