driver/5/3/5
This commit is contained in:
@@ -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()),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:SEFER/controller/auth/captin/login_captin_controller.dart';
|
||||
import 'package:SEFER/views/auth/captin/login_captin.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -12,7 +13,6 @@ import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
import 'package:SEFER/views/widgets/my_textField.dart';
|
||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../../controller/auth/login_controller.dart';
|
||||
import '../../../controller/functions/log_out.dart';
|
||||
|
||||
class PassengerProfilePage extends StatelessWidget {
|
||||
@@ -372,7 +372,7 @@ class CountryPicker extends StatelessWidget {
|
||||
MyElevatedButton(
|
||||
title: 'Select Country'.tr, // Use translated text for button
|
||||
onPressed: () {
|
||||
Get.find<LoginController>().saveCountryCode(controller
|
||||
Get.find<LoginCaptinController>().saveCountryCode(controller
|
||||
.selectedCountry
|
||||
.toString()); // No conversion needed
|
||||
box.write(
|
||||
@@ -391,7 +391,8 @@ class CountryPicker extends StatelessWidget {
|
||||
|
||||
class CountryPickerFromSetting extends StatelessWidget {
|
||||
final ProfileController controller = Get.put(ProfileController());
|
||||
final LoginController loginController = Get.put(LoginController());
|
||||
final LoginCaptinController loginController =
|
||||
Get.put(LoginCaptinController());
|
||||
|
||||
final List<String> countryOptions = [
|
||||
'Jordan',
|
||||
|
||||
Reference in New Issue
Block a user