passnger/5/3/4
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/controller/functions/crud.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -25,18 +24,32 @@ class AiPage extends StatelessWidget {
|
||||
return MyScafolld(
|
||||
title: 'Documents check'.tr,
|
||||
body: [
|
||||
// box.read(BoxName.countryCode) == 'USA'
|
||||
// ? UsaAiDocuments(scanDocumentsByApi: scanDocumentsByApi)
|
||||
// : box.read(BoxName.countryCode) == 'Jordan'
|
||||
// ? JordanDocumants(contentController: contentController)
|
||||
// :
|
||||
// EgyptDocuments(contentController: contentController),
|
||||
// box.read(BoxName.countryCode) == 'USA'
|
||||
// ? usaDriverLicensWidget()
|
||||
// : box.read(BoxName.countryCode) == 'Jordan'
|
||||
// ? jordanDriverLicenseWidget()
|
||||
// :
|
||||
egyptDriverLicenseWidget()
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: Get.width,
|
||||
height: Get.height * .3,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Center(
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
await CRUD().allMethodForAI(
|
||||
'name,address,dob,nationalNo,',
|
||||
AppLink.uploadEgypt,
|
||||
'idFront'); //egypt
|
||||
},
|
||||
child: Text(
|
||||
'Take Picture Of ID Card'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
isleading: true);
|
||||
}
|
||||
@@ -44,260 +57,251 @@ class AiPage extends StatelessWidget {
|
||||
GetBuilder<AI> egyptDriverLicenseWidget() {
|
||||
return GetBuilder<AI>(
|
||||
builder: (contentController) => contentController.responseMap.isNotEmpty
|
||||
? Positioned(
|
||||
top: Get.height * .09,
|
||||
left: Get.width * .051,
|
||||
right: Get.width * .051,
|
||||
child: contentController.isloading
|
||||
? Column(
|
||||
children: [
|
||||
const MyCircularProgressIndicator(),
|
||||
Text(
|
||||
'We are process picture please wait '.tr,
|
||||
style: AppStyle.title,
|
||||
)
|
||||
],
|
||||
? contentController.isloading
|
||||
? Column(
|
||||
children: [
|
||||
const MyCircularProgressIndicator(),
|
||||
Text(
|
||||
'We are process picture please wait '.tr,
|
||||
style: AppStyle.title,
|
||||
)
|
||||
: SizedBox(
|
||||
height: Get.height * .7,
|
||||
child: ListView(
|
||||
children: [
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
// height: Get.height * .4,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(5),
|
||||
child: contentController.responseMap.isEmpty
|
||||
? Center(
|
||||
child: Text(
|
||||
'Take Picture Of ID Card'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
: Column(
|
||||
],
|
||||
)
|
||||
: SizedBox(
|
||||
height: Get.height * .7,
|
||||
child: ListView(
|
||||
children: [
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
// height: Get.height * .4,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(5),
|
||||
child: contentController.responseMap.isEmpty
|
||||
? Center(
|
||||
child: Text(
|
||||
'Take Picture Of ID Card'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
MainAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'${'Name'.tr} :${contentController.responseMap['first_name']}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
Text(
|
||||
' ${contentController.responseMap['last_name']}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
Text(
|
||||
'${'Name'.tr} :${contentController.responseMap['first_name']}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
Text(
|
||||
'${'Name in arabic'.tr}: ${contentController.responseMap['name_in_arabic']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Drivers License Class'.tr}: ${contentController.responseMap['class']}',
|
||||
style: AppStyle.title,
|
||||
' ${contentController.responseMap['last_name']}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'National Number'.tr}: ${contentController.responseMap['id']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
// Image.memory(
|
||||
// scanDocumentsByApi
|
||||
// .imagePortrait,
|
||||
// width: 60,
|
||||
// ),
|
||||
]),
|
||||
Text(
|
||||
'${'Address'.tr}: ${contentController.responseMap['address']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'Date of Birth'.tr}: ${contentController.responseMap['dob']}',
|
||||
'${'Name in arabic'.tr}: ${contentController.responseMap['name_in_arabic']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Age'.tr} : ${contentController.responseMap['age_in_years']}',
|
||||
'${'Drivers License Class'.tr}: ${contentController.responseMap['class']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'Expiry Date'.tr}: ${contentController.responseMap['expiration_date']}',
|
||||
style: DateTime.parse(
|
||||
contentController
|
||||
.responseMap[
|
||||
'expiration_date']
|
||||
.toString())
|
||||
.isBefore(
|
||||
contentController.now)
|
||||
? AppStyle.title.copyWith(
|
||||
color: AppColor.redColor)
|
||||
: AppStyle.title.copyWith(
|
||||
color:
|
||||
AppColor.greenColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
DateTime.parse(contentController
|
||||
.responseMap['expiration_date']
|
||||
.toString())
|
||||
.isBefore(contentController.now)
|
||||
? Text(
|
||||
'You can\'t continue with us .\nYou should renew Driver license'
|
||||
.tr,
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.redColor),
|
||||
)
|
||||
: MyElevatedButton(
|
||||
kolor: AppColor.greenColor,
|
||||
title: 'Lets check Car license '.tr,
|
||||
onPressed: () => contentController
|
||||
.getCarLicenseJordanContent()),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
contentController.responseCarLicenseMap.isNotEmpty
|
||||
? Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
// height: Get.height * .3,
|
||||
width: Get.width * .9,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'${'Name'.tr} ${contentController.responseCarLicenseMap['name']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Address'.tr} ${contentController.responseCarLicenseMap['address']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Car Kind'.tr} ${contentController.responseCarLicenseMap['car_kind']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Color'.tr} ${contentController.responseCarLicenseMap['car_color']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Year'.tr} ${contentController.responseCarLicenseMap['car_year']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Car Plate'.tr} ${contentController.responseCarLicenseMap['car_plate']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Car Expire'.tr} ${contentController.responseCarLicenseMap['expire_date_of_license']}',
|
||||
style: contentController
|
||||
.responseCarLicenseMap
|
||||
.isNotEmpty
|
||||
? DateTime.parse(contentController
|
||||
.responseCarLicenseMap[
|
||||
'expire_date_of_license']
|
||||
.toString())
|
||||
.isBefore(
|
||||
contentController.now)
|
||||
? AppStyle.title.copyWith(
|
||||
color: AppColor.redColor)
|
||||
: AppStyle.title.copyWith(
|
||||
color: AppColor.greenColor)
|
||||
: null,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// DateTime.parse(contentController
|
||||
// .responseCarLicenseMap[
|
||||
// 'expire_date_of_license']
|
||||
// .toString())
|
||||
// .isBefore(contentController.now)
|
||||
// ? Text(
|
||||
// 'You can\'t continue with us .\nYou should renew Car license'
|
||||
// .tr,
|
||||
// style: AppStyle.title.copyWith(
|
||||
// color: AppColor.redColor),
|
||||
// )
|
||||
// :
|
||||
MyElevatedButton(
|
||||
kolor: AppColor.greenColor,
|
||||
title: 'Lets check License Back Face'.tr,
|
||||
onPressed: () => contentController
|
||||
.generateBackCarLicenseJordanContent()),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
contentController.responseBackCarLicenseMap.isNotEmpty
|
||||
? Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
// height: 300,
|
||||
child: Column(children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'National Number'.tr}: ${contentController.responseMap['id']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
// Image.memory(
|
||||
// scanDocumentsByApi
|
||||
// .imagePortrait,
|
||||
// width: 60,
|
||||
// ),
|
||||
]),
|
||||
Text(
|
||||
'VIN ${contentController.responseBackCarLicenseMap['vin']}',
|
||||
'${'Address'.tr}: ${contentController.responseMap['address']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'Fuel Type ${contentController.responseBackCarLicenseMap['fuelType']}',
|
||||
style: AppStyle.title,
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'Date of Birth'.tr}: ${contentController.responseMap['dob']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Age'.tr} : ${contentController.responseMap['age_in_years']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'Insurance Company ${contentController.responseBackCarLicenseMap['insuranceCompany']}',
|
||||
style: AppStyle.title,
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'Expiry Date'.tr}: ${contentController.responseMap['expiration_date']}',
|
||||
style: DateTime.parse(
|
||||
contentController
|
||||
.responseMap[
|
||||
'expiration_date']
|
||||
.toString())
|
||||
.isBefore(
|
||||
contentController.now)
|
||||
? AppStyle.title.copyWith(
|
||||
color: AppColor.redColor)
|
||||
: AppStyle.title.copyWith(
|
||||
color: AppColor.greenColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'Policy Number ${contentController.responseBackCarLicenseMap['policyNumber']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'Insurance Type ${contentController.responseBackCarLicenseMap['insuranceType']}',
|
||||
style: AppStyle.title,
|
||||
)
|
||||
]))
|
||||
: const SizedBox()
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
DateTime.parse(contentController
|
||||
.responseMap['expiration_date']
|
||||
.toString())
|
||||
.isBefore(contentController.now)
|
||||
? Text(
|
||||
'You can\'t continue with us .\nYou should renew Driver license'
|
||||
.tr,
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.redColor),
|
||||
)
|
||||
: MyElevatedButton(
|
||||
kolor: AppColor.greenColor,
|
||||
title: 'Lets check Car license '.tr,
|
||||
onPressed: () => contentController
|
||||
.getCarLicenseJordanContent()),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
contentController.responseCarLicenseMap.isNotEmpty
|
||||
? Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
// height: Get.height * .3,
|
||||
width: Get.width * .9,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'${'Name'.tr} ${contentController.responseCarLicenseMap['name']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Address'.tr} ${contentController.responseCarLicenseMap['address']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Car Kind'.tr} ${contentController.responseCarLicenseMap['car_kind']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Color'.tr} ${contentController.responseCarLicenseMap['car_color']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Year'.tr} ${contentController.responseCarLicenseMap['car_year']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Car Plate'.tr} ${contentController.responseCarLicenseMap['car_plate']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Car Expire'.tr} ${contentController.responseCarLicenseMap['expire_date_of_license']}',
|
||||
style: contentController
|
||||
.responseCarLicenseMap.isNotEmpty
|
||||
? DateTime.parse(contentController
|
||||
.responseCarLicenseMap[
|
||||
'expire_date_of_license']
|
||||
.toString())
|
||||
.isBefore(contentController.now)
|
||||
? AppStyle.title.copyWith(
|
||||
color: AppColor.redColor)
|
||||
: AppStyle.title.copyWith(
|
||||
color: AppColor.greenColor)
|
||||
: null,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// DateTime.parse(contentController
|
||||
// .responseCarLicenseMap[
|
||||
// 'expire_date_of_license']
|
||||
// .toString())
|
||||
// .isBefore(contentController.now)
|
||||
// ? Text(
|
||||
// 'You can\'t continue with us .\nYou should renew Car license'
|
||||
// .tr,
|
||||
// style: AppStyle.title.copyWith(
|
||||
// color: AppColor.redColor),
|
||||
// )
|
||||
// :
|
||||
MyElevatedButton(
|
||||
kolor: AppColor.greenColor,
|
||||
title: 'Lets check License Back Face'.tr,
|
||||
onPressed: () => contentController
|
||||
.generateBackCarLicenseJordanContent()),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
contentController.responseBackCarLicenseMap.isNotEmpty
|
||||
? Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
// height: 300,
|
||||
child: Column(children: [
|
||||
Text(
|
||||
'VIN ${contentController.responseBackCarLicenseMap['vin']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'Fuel Type ${contentController.responseBackCarLicenseMap['fuelType']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'Insurance Company ${contentController.responseBackCarLicenseMap['insuranceCompany']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'Policy Number ${contentController.responseBackCarLicenseMap['policyNumber']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'Insurance Type ${contentController.responseBackCarLicenseMap['insuranceType']}',
|
||||
style: AppStyle.title,
|
||||
)
|
||||
]))
|
||||
: const SizedBox()
|
||||
],
|
||||
),
|
||||
)
|
||||
: Positioned(
|
||||
top: Get.height * .06,
|
||||
left: Get.width * .051,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:SEFER/constant/api_key.dart';
|
||||
import 'package:animated_text_kit/animated_text_kit.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -6,9 +5,7 @@ import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../constant/box_name.dart';
|
||||
import '../../../constant/char_map.dart';
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../constant/credential.dart';
|
||||
import '../../../constant/info.dart';
|
||||
import '../../../constant/style.dart';
|
||||
import '../../../controller/auth/captin/login_captin_controller.dart';
|
||||
@@ -21,7 +18,7 @@ import '../../widgets/mycircular.dart';
|
||||
import 'register_captin.dart';
|
||||
|
||||
class LoginCaptin extends StatelessWidget {
|
||||
final controller = Get.put(LoginController());
|
||||
// final controller = Get.put(LoginController());
|
||||
|
||||
LoginCaptin({super.key});
|
||||
|
||||
@@ -32,7 +29,7 @@ class LoginCaptin extends StatelessWidget {
|
||||
return GetBuilder<LoginCaptinController>(
|
||||
builder: (controller) => MyScafolld(
|
||||
title: 'Login Driver'.tr,
|
||||
isleading: true,
|
||||
isleading: false,
|
||||
body: [
|
||||
if (box.read(BoxName.agreeTerms) != 'agreed')
|
||||
agreedPage()
|
||||
|
||||
Reference in New Issue
Block a user