6/25/1
This commit is contained in:
@@ -40,7 +40,7 @@ class DrawerCaptain extends StatelessWidget {
|
||||
_buildDrawerItem(
|
||||
icon: Icons.person,
|
||||
text: 'Profile'.tr,
|
||||
onTap: () => Get.to(() => const ProfileCaptain(),
|
||||
onTap: () => Get.to(() => ProfileCaptain(),
|
||||
transition: Transition.rightToLeftWithFade),
|
||||
),
|
||||
_buildDivider(),
|
||||
|
||||
51
lib/views/home/my_wallet/bank_account_egypt.dart
Normal file
51
lib/views/home/my_wallet/bank_account_egypt.dart
Normal file
@@ -0,0 +1,51 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class BankController extends GetxController {
|
||||
String selectedBank = '';
|
||||
Map<String, String> bankNames = {
|
||||
'CIB Bank'.tr: 'CIB',
|
||||
'National Bank of Egypt'.tr: 'NBE',
|
||||
'QNB Al Ahli'.tr: 'QNB',
|
||||
'Bank Misr'.tr: 'BM',
|
||||
// Add other bank full names and short names here
|
||||
};
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
selectedBank = bankNames.values.first;
|
||||
}
|
||||
|
||||
void updateSelectedBank(String? bankShortName) {
|
||||
selectedBank = bankShortName ?? '';
|
||||
update();
|
||||
}
|
||||
|
||||
List<DropdownMenuItem<String>> getDropdownItems() {
|
||||
return bankNames.keys.map<DropdownMenuItem<String>>((bankFullName) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: bankNames[bankFullName],
|
||||
child: Text(bankFullName),
|
||||
);
|
||||
}).toList();
|
||||
}
|
||||
}
|
||||
|
||||
class BankDropdown extends StatelessWidget {
|
||||
final BankController bankController = Get.put(BankController());
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<BankController>(
|
||||
init: bankController,
|
||||
builder: (controller) {
|
||||
return DropdownButton<String>(
|
||||
value: controller.selectedBank,
|
||||
onChanged: controller.updateSelectedBank,
|
||||
items: controller.getDropdownItems(),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -152,17 +152,20 @@ class CardSeferWalletDriver extends StatelessWidget {
|
||||
color: AppColor.deepPurpleAccent,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
gradient: const LinearGradient(
|
||||
colors: [AppColor.blueColor, AppColor.primaryColor]),
|
||||
colors: [AppColor.greyColor, AppColor.writeColor]),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'${AppInformation.appName} Wallet',
|
||||
style: AppStyle.headTitle
|
||||
.copyWith(color: AppColor.primaryColor),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Text(
|
||||
'${AppInformation.appName} Wallet',
|
||||
style: AppStyle.headTitle
|
||||
.copyWith(color: AppColor.writeColor),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
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/controller/payment/passenger_wallet_history_controller.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
|
||||
class PaymentHistoryPassengerPage extends StatelessWidget {
|
||||
const PaymentHistoryPassengerPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(PassengerWalletHistoryController());
|
||||
return MyScafolld(
|
||||
title: 'Payment History'.tr,
|
||||
body: [
|
||||
GetBuilder<PassengerWalletHistoryController>(
|
||||
builder: (controller) => controller.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: controller.archive.isEmpty
|
||||
? Center(
|
||||
child: Text(
|
||||
'No wallet record found'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: controller.archive.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var list = controller.archive[index];
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: double.parse(list['balance']) < 0
|
||||
? AppColor.redColor.withOpacity(.4)
|
||||
: AppColor.greenColor.withOpacity(.4)),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
list['balance'],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
list['created_at'],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
isleading: true);
|
||||
}
|
||||
}
|
||||
@@ -97,30 +97,43 @@ class PointsCaptain extends StatelessWidget {
|
||||
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,
|
||||
width: Get.width * .22,
|
||||
height: Get.width * .22,
|
||||
margin: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
kolor.withOpacity(0.3),
|
||||
kolor,
|
||||
kolor.withOpacity(0.7),
|
||||
kolor,
|
||||
],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
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,
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
border: Border.all(color: AppColor.accentColor),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
'$countPoint ${box.read(BoxName.countryCode) == 'Jordan' ? 'JOD'.tr : 'L.E'.tr}',
|
||||
style: AppStyle.subtitle
|
||||
.copyWith(color: AppColor.secondaryColor),
|
||||
),
|
||||
Text(
|
||||
'$pricePoint ${box.read(BoxName.countryCode) == 'Jordan' ? 'JOD'.tr : 'L.E'.tr}',
|
||||
style:
|
||||
AppStyle.title.copyWith(color: AppColor.secondaryColor),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import 'package:SEFER/constant/links.dart';
|
||||
import 'package:SEFER/controller/functions/crud.dart';
|
||||
import 'package:SEFER/controller/functions/tts.dart';
|
||||
import 'package:SEFER/controller/home/payment/paymob_payout.dart';
|
||||
import 'package:SEFER/views/home/my_wallet/bank_account_egypt.dart';
|
||||
import 'package:SEFER/views/home/my_wallet/payment_history_driver_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -48,19 +51,19 @@ class WalletCaptain extends StatelessWidget {
|
||||
0 &&
|
||||
double.parse(
|
||||
captainWalletController.totalPoints) >
|
||||
-300
|
||||
-3000
|
||||
? AppColor.yellowColor
|
||||
: double.parse(
|
||||
captainWalletController.totalPoints) <
|
||||
-300
|
||||
-3000
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
// ),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.snackbar(
|
||||
'the 300 points equal 300 L.E'.tr,
|
||||
'the 300 points equal 300 L.E for you \nSo go and gain your money'
|
||||
'the 3000 points equal 3000 L.E'.tr,
|
||||
'the 3000 points equal 3000 L.E for you \nSo go and gain your money'
|
||||
.tr,
|
||||
backgroundColor: AppColor.greenColor,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
@@ -83,7 +86,7 @@ class WalletCaptain extends StatelessWidget {
|
||||
),
|
||||
double.parse(captainWalletController.totalPoints
|
||||
.toString()) <
|
||||
-300
|
||||
-3000
|
||||
? MyElevatedButton(
|
||||
title: 'Charge your Account'.tr,
|
||||
onPressed: () {})
|
||||
@@ -110,7 +113,7 @@ class WalletCaptain extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 2,
|
||||
color: AppColor.redColor)),
|
||||
color: AppColor.writeColor)),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.snackbar(
|
||||
@@ -159,7 +162,7 @@ class WalletCaptain extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 2,
|
||||
color: AppColor.greenColor)),
|
||||
color: AppColor.writeColor)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(2),
|
||||
child: InkWell(
|
||||
@@ -276,47 +279,47 @@ class WalletCaptain extends StatelessWidget {
|
||||
height: 10,
|
||||
),
|
||||
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(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Column(children: [
|
||||
Text(
|
||||
"You can purchase a budget to enable online access through the options listed 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,
|
||||
kolor: AppColor.greyColor,
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? 5
|
||||
: 100,
|
||||
: 80,
|
||||
countPoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '300'
|
||||
: '100',
|
||||
? '3000'
|
||||
: '1000',
|
||||
),
|
||||
PointsCaptain(
|
||||
kolor: Colors.green,
|
||||
kolor: AppColor
|
||||
.bronze, // Bronze color for medium value
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
@@ -326,10 +329,11 @@ class WalletCaptain extends StatelessWidget {
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '1040'
|
||||
: '210',
|
||||
: '2500',
|
||||
),
|
||||
PointsCaptain(
|
||||
kolor: Colors.amberAccent,
|
||||
kolor: AppColor
|
||||
.goldenBronze, // Golden bronze color for higher value
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
@@ -338,11 +342,12 @@ class WalletCaptain extends StatelessWidget {
|
||||
countPoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '2300'
|
||||
: '450',
|
||||
? '23000'
|
||||
: '5100',
|
||||
),
|
||||
PointsCaptain(
|
||||
kolor: AppColor.yellowColor,
|
||||
kolor: AppColor
|
||||
.gold, // Gold color for highest value
|
||||
pricePoint:
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
@@ -352,14 +357,12 @@ class WalletCaptain extends StatelessWidget {
|
||||
box.read(BoxName.countryCode) ==
|
||||
'Jordan'
|
||||
? '55000'
|
||||
: '1200',
|
||||
: '130000',
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
]))),
|
||||
const SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
@@ -374,10 +377,11 @@ class WalletCaptain extends StatelessWidget {
|
||||
title:
|
||||
'Create Wallet to receive your money',
|
||||
onPressed: () async {
|
||||
PaymentController paymentController =
|
||||
Get.find<PaymentController>();
|
||||
paymentController
|
||||
.createConnectAccount();
|
||||
box.read(BoxName.countryCode) == 'Egypt'
|
||||
? addBankCodeEgypt(
|
||||
captainWalletController)
|
||||
: Get.find<PaymentController>()
|
||||
.createConnectAccount();
|
||||
}),
|
||||
],
|
||||
)
|
||||
@@ -440,6 +444,49 @@ class WalletCaptain extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
Future<dynamic> addBankCodeEgypt(
|
||||
CaptainWalletController captainWalletController) {
|
||||
return Get.defaultDialog(
|
||||
title: "Insert Account Bank".tr,
|
||||
content: Form(
|
||||
key: captainWalletController.formKeyAccount,
|
||||
child: Column(
|
||||
children: [
|
||||
Text("Insert Card Bank Details to Receive Your Visa Money Weekly"
|
||||
.tr),
|
||||
MyTextForm(
|
||||
controller: captainWalletController.cardBank,
|
||||
label: "Insert card number".tr,
|
||||
hint: '4123 4567 8910 1235',
|
||||
type: TextInputType.number),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
BankDropdown()
|
||||
],
|
||||
)),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: () async {
|
||||
if (captainWalletController.formKeyAccount.currentState!
|
||||
.validate()) {
|
||||
Get.back();
|
||||
var res =
|
||||
await CRUD().post(link: AppLink.updateAccountBank, payload: {
|
||||
"bankCode": Get.find<BankController>().selectedBank.toString(),
|
||||
"accountBank": captainWalletController.cardBank.text.toString(),
|
||||
"id": box.read(BoxName.driverID).toString()
|
||||
});
|
||||
print('res: ${res}');
|
||||
if (res != 'failure') {
|
||||
Get.snackbar(
|
||||
'updated succses'.tr, 'bank account added succesfly',
|
||||
backgroundColor: AppColor.greenColor);
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
class MyDropDown1 extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/home/payment/captain_wallet_controller.dart';
|
||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/profile/captain_profile_controller.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
|
||||
class ProfileCaptain extends StatelessWidget {
|
||||
const ProfileCaptain({super.key});
|
||||
import '../my_wallet/walet_captain.dart';
|
||||
|
||||
class ProfileCaptain extends StatelessWidget {
|
||||
ProfileCaptain({super.key});
|
||||
CaptainWalletController captainWalletController = CaptainWalletController();
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(CaptainProfileController());
|
||||
@@ -21,43 +24,77 @@ class ProfileCaptain extends StatelessWidget {
|
||||
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,
|
||||
: Column(
|
||||
children: [
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
addBankCodeEgypt(captainWalletController);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
'Add bank Account'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: Get.height * .8,
|
||||
child: 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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -65,63 +102,6 @@ class ProfileCaptain extends StatelessWidget {
|
||||
)
|
||||
],
|
||||
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),
|
||||
// ),
|
||||
// )
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -167,175 +147,178 @@ class DriverProfileCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
elevation: 8,
|
||||
return Container(
|
||||
// elevation: 8,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
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',
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
child: SingleChildScrollView(
|
||||
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