driver/5/3/5

This commit is contained in:
Hamza-Ayed
2024-05-03 18:40:40 +03:00
parent 90acb96e40
commit b473a9ce09
57 changed files with 182 additions and 181 deletions

View File

@@ -25,13 +25,13 @@ class LoginCaptin extends StatelessWidget {
@override
Widget build(BuildContext context) {
Get.put(LoginCaptinController());
final controller = Get.put(LoginController());
return GetBuilder<LoginCaptinController>(
builder: (controller) => MyScafolld(
title: 'Login Driver'.tr,
isleading: false,
body: [
if (box.read(BoxName.agreeTerms) != 'agreed')
if (box.read(BoxName.agreeTerms).toString() != 'agreed')
agreedPage()
else if (box.read(BoxName.countryCode) == null)
CountryPicker()
@@ -228,92 +228,89 @@ class LoginCaptin extends StatelessWidget {
Padding agreedPage() {
return Padding(
padding: const EdgeInsets.all(16),
child: SingleChildScrollView(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset(
'assets/images/notepad.png',
width: Get.width * .2,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset(
'assets/images/notepad.png',
width: Get.width * .2,
),
SizedBox(
width: Get.width * .7,
child: Text(
'Accept Ride\'s Terms & Review Privacy Notice'.tr,
style: AppStyle.headTitle2,
),
SizedBox(
width: Get.width * .7,
child: Text(
'Accept Ride\'s Terms & Review Privacy Notice'.tr,
style: AppStyle.headTitle2,
),
),
],
),
const SizedBox(
height: 30,
),
RichText(
text: TextSpan(
text:
'By selecting "I Agree" below, I have reviewed and agree to the Terms of Use and acknowledge the '
.tr,
style: AppStyle.title,
children: <TextSpan>[
TextSpan(
text: 'Privacy Notice'.tr,
style: const TextStyle(
decoration: TextDecoration.underline,
color: AppColor.blueColor),
recognizer: TapGestureRecognizer()
..onTap = () {
Get.defaultDialog(
title: ''.tr,
content: const SizedBox(
height: 400,
width: 400,
child: SingleChildScrollView(
child: HtmlWidget(AppInformation.privacyPolicy),
),
));
}),
const TextSpan(
text: '. I am at least 18 years of age.',
),
],
),
const SizedBox(
height: 30,
),
const SizedBox(
height: 100,
),
GetBuilder<LoginCaptinController>(
builder: (controller) => Column(
children: [
Row(
children: [
Checkbox.adaptive(
autofocus: true,
tristate: true,
splashRadius: 25,
activeColor: AppColor.primaryColor,
value: controller.isAgreeTerms,
onChanged: (value) => controller.changeAgreeTerm(),
),
Text(
'I Agree'.tr,
style: controller.isAgreeTerms
? AppStyle.title
: AppStyle.title
.copyWith(color: AppColor.accentColor),
),
],
),
MyElevatedButton(
title: 'Submit'.tr,
onPressed: () => controller.saveAgreementTerms()),
],
),
RichText(
text: TextSpan(
text:
'By selecting "I Agree" below, I have reviewed and agree to the Terms of Use and acknowledge the '
.tr,
style: AppStyle.title,
children: <TextSpan>[
TextSpan(
text: 'Privacy Notice'.tr,
style: const TextStyle(
decoration: TextDecoration.underline,
color: AppColor.blueColor),
recognizer: TapGestureRecognizer()
..onTap = () {
Get.defaultDialog(
title: ''.tr,
content: const SizedBox(
height: 400,
width: 400,
child: SingleChildScrollView(
child:
HtmlWidget(AppInformation.privacyPolicy),
),
));
}),
const TextSpan(
text: '. I am at least 18 years of age.',
),
],
),
),
const SizedBox(
height: 100,
),
GetBuilder<LoginController>(
builder: (controller) => Column(
children: [
Row(
children: [
Checkbox.adaptive(
autofocus: true,
tristate: true,
splashRadius: 25,
activeColor: AppColor.primaryColor,
value: controller.isAgreeTerms,
onChanged: (value) => controller.changeAgreeTerm(),
),
Text(
'I Agree'.tr,
style: controller.isAgreeTerms
? AppStyle.title
: AppStyle.title
.copyWith(color: AppColor.accentColor),
),
],
),
MyElevatedButton(
title: 'Submit'.tr,
onPressed: () => controller.saveAgreementTerms()),
],
),
)
],
),
)
],
),
);
}