This commit is contained in:
Hamza-Ayed
2023-12-03 10:35:27 +03:00
parent e095cf564a
commit 2501292424
50 changed files with 1841 additions and 730 deletions

View File

@@ -148,10 +148,13 @@ class LoginCaptin extends StatelessWidget {
'Please enter your phone number.'.tr,
),
validator: (value) {
if (value!.isEmpty ||
(value.length > 6)) {
if (value!.isEmpty) {
return 'Please enter Your Password.'.tr;
}
if (value.length < 6) {
return 'Password must br at least 6 character.'
.tr;
}
return null;
},
),
@@ -261,88 +264,91 @@ class LoginCaptin extends StatelessWidget {
Padding agreedPage() {
return Padding(
padding: const EdgeInsets.all(16),
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,
),
),
],
),
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 ',
style: AppStyle.title,
children: <TextSpan>[
TextSpan(
text: 'Privacy Notice',
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(
child: SingleChildScrollView(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
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),
),
],
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,
),
),
MyElevatedButton(
title: 'Submit'.tr,
onPressed: () => controller.saveAgreementTerms()),
],
),
)
],
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 ',
style: AppStyle.title,
children: <TextSpan>[
TextSpan(
text: 'Privacy Notice',
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()),
],
),
)
],
),
),
);
}