24-12/26/1
This commit is contained in:
@@ -37,461 +37,297 @@ class LoginPage extends StatelessWidget {
|
||||
isleading: false,
|
||||
body: [
|
||||
if (box.read(BoxName.agreeTerms) != 'agreed')
|
||||
agreedPage()
|
||||
_buildAgreementPage(controller)
|
||||
else if (box.read(BoxName.countryCode) == null)
|
||||
CountryPicker()
|
||||
_buildCountryPicker()
|
||||
else if (box.read(BoxName.locationPermission) != 'true')
|
||||
locationPermissionDialog()
|
||||
_buildLocationPermissionDialog(controller)
|
||||
else
|
||||
SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
height: Get.height * .7,
|
||||
width: Get.width * .9,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/logo.gif',
|
||||
height: Get.width * .3,
|
||||
width: Get.width * .3,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
Platform.isIOS && controller.isTest == 0
|
||||
? Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Column(
|
||||
children: [
|
||||
Form(
|
||||
key: controller.formKey,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
TextFormField(
|
||||
keyboardType: TextInputType
|
||||
.emailAddress,
|
||||
controller: controller
|
||||
.emailController,
|
||||
decoration: InputDecoration(
|
||||
focusedBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color: AppColor
|
||||
.primaryColor,
|
||||
width: 2.0,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
10),
|
||||
),
|
||||
fillColor:
|
||||
AppColor.accentColor,
|
||||
hoverColor:
|
||||
AppColor.accentColor,
|
||||
focusColor:
|
||||
AppColor.accentColor,
|
||||
border: const OutlineInputBorder(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
12))),
|
||||
labelText: 'Email'.tr,
|
||||
hintText:
|
||||
'Enter your email address'
|
||||
.tr,
|
||||
),
|
||||
validator: (value) {
|
||||
if (value!.isEmpty ||
|
||||
(!value.contains('@') ||
|
||||
!value.contains(
|
||||
'.'))) {
|
||||
return 'Please enter Your Email.'
|
||||
.tr;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
TextFormField(
|
||||
obscureText: true,
|
||||
keyboardType: TextInputType
|
||||
.emailAddress,
|
||||
controller: controller
|
||||
.passwordController,
|
||||
decoration: InputDecoration(
|
||||
focusedBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color: AppColor
|
||||
.primaryColor,
|
||||
width: 2.0,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
10),
|
||||
),
|
||||
fillColor:
|
||||
AppColor.accentColor,
|
||||
hoverColor:
|
||||
AppColor.accentColor,
|
||||
focusColor:
|
||||
AppColor.accentColor,
|
||||
border: const OutlineInputBorder(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
12))),
|
||||
labelText: 'Password'.tr,
|
||||
hintText:
|
||||
'Please enter your phone number.'
|
||||
.tr,
|
||||
),
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Please enter Your Password.'
|
||||
.tr;
|
||||
}
|
||||
if (value.length < 6) {
|
||||
return 'Password must br at least 6 character.'
|
||||
.tr;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
GetBuilder<LoginController>(
|
||||
builder: (controller) =>
|
||||
controller.isloading
|
||||
? const MyCircularProgressIndicator()
|
||||
: MyElevatedButton(
|
||||
onPressed: () {
|
||||
if (controller
|
||||
.formKey
|
||||
.currentState!
|
||||
.validate()) {
|
||||
controller
|
||||
.login();
|
||||
}
|
||||
},
|
||||
title:
|
||||
'Submit'.tr,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
height: Get.height * .3,
|
||||
width: Get.width * .8,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Sign in with Google for easier email and name entry'
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
// MyElevatedButton(
|
||||
// title: 'Sign In by Google'.tr,
|
||||
// onPressed: () async {
|
||||
// await GoogleSignInHelper.signInFromLogin();
|
||||
// },
|
||||
// kolor: AppColor.blueColor,
|
||||
// ),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
await GoogleSignInHelper().signInFromLogin();
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16, vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.redColor,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(
|
||||
FontAwesome.google,
|
||||
color: AppColor.blueColor,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Sign In by Google'.tr,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
!Platform.isAndroid
|
||||
? GestureDetector(
|
||||
onTap: () async {
|
||||
User? user =
|
||||
await authController.signInWithApple();
|
||||
if (user != null) {
|
||||
box.write(BoxName.passengerID, user.uid);
|
||||
box.write(BoxName.email, user.email);
|
||||
await controller.loginUsingCredentials(
|
||||
box
|
||||
.read(BoxName.passengerID)
|
||||
.toString(),
|
||||
box.read(BoxName.email).toString(),
|
||||
);
|
||||
// Navigate to another screen or perform other actions
|
||||
} else {
|
||||
Get.snackbar('user not found'.tr, '',
|
||||
backgroundColor: AppColor.redColor);
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16, vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.apple,
|
||||
color: Colors.white,
|
||||
size: 24,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Sign in with Apple'.tr,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
)),
|
||||
SizedBox(
|
||||
height: Get.height * .1,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () => Get.to(() => ContactUsPage()),
|
||||
child: Text(
|
||||
'If you need assistance, contact us'
|
||||
.tr, // Improved wording
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
),
|
||||
// Text(
|
||||
// 'if you dont have account'.tr,
|
||||
// style: AppStyle.subtitle,
|
||||
// ),
|
||||
// AnimatedTextKit(
|
||||
// onTap: () => Get.to(() => SmsSignupEgypt()),
|
||||
// animatedTexts: [
|
||||
// TypewriterAnimatedText(
|
||||
// 'Register'.tr,
|
||||
// textStyle: AppStyle.headTitle2,
|
||||
// speed: const Duration(milliseconds: 200),
|
||||
// ),
|
||||
// ],
|
||||
// totalRepeatCount: 4,
|
||||
// pause: const Duration(milliseconds: 200),
|
||||
// displayFullTextOnTap: true,
|
||||
// stopPauseOnTap: true,
|
||||
// ),
|
||||
// const Spacer(),
|
||||
const SizedBox(
|
||||
height: 100,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
_buildLoginContent(controller, authController),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Padding agreedPage() {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: SingleChildScrollView(
|
||||
Widget _buildLoginContent(
|
||||
LoginController controller, AuthController authController) {
|
||||
return SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
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,
|
||||
),
|
||||
),
|
||||
],
|
||||
Image.asset(
|
||||
'assets/images/logo.gif',
|
||||
height: Get.width * 0.4,
|
||||
width: Get.width * 0.4,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
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),
|
||||
),
|
||||
));
|
||||
}),
|
||||
TextSpan(
|
||||
text: '. I am at least 18 years of age.'.tr,
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 32),
|
||||
if (Platform.isIOS && controller.isTest == 0)
|
||||
_buildEmailPasswordForm(controller)
|
||||
else
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 24.0),
|
||||
child: Text(
|
||||
'Sign in for a seamless experience'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async => await GoogleSignInHelper().signInFromLogin(),
|
||||
child: _buildSocialButton(
|
||||
icon: FontAwesome.google,
|
||||
text: 'Sign In with Google'.tr,
|
||||
color: AppColor.redColor,
|
||||
),
|
||||
),
|
||||
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()),
|
||||
],
|
||||
const SizedBox(height: 16),
|
||||
if (!Platform.isAndroid)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
User? user = await authController.signInWithApple();
|
||||
if (user != null) {
|
||||
box.write(BoxName.passengerID, user.uid);
|
||||
box.write(BoxName.email, user.email);
|
||||
await controller.loginUsingCredentials(
|
||||
box.read(BoxName.passengerID).toString(),
|
||||
box.read(BoxName.email).toString(),
|
||||
);
|
||||
} else {
|
||||
Get.snackbar('User not found'.tr, '',
|
||||
backgroundColor: AppColor.redColor);
|
||||
}
|
||||
},
|
||||
child: _buildSocialButton(
|
||||
icon: Icons.apple,
|
||||
text: 'Sign in with Apple'.tr,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
)
|
||||
const SizedBox(height: 40),
|
||||
GestureDetector(
|
||||
onTap: () => Get.to(() => ContactUsPage()),
|
||||
child: Text(
|
||||
'Need assistance? Contact us'.tr,
|
||||
style: AppStyle.subtitle.copyWith(color: Colors.grey),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
locationPermissionDialog() {
|
||||
return GetBuilder<LoginController>(builder: (controller) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Container(
|
||||
height: Get.height * .4,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Center(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
'We use your precise location to find the nearest available driver and provide accurate pickup and dropoff information. You can manage this in Settings.'
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
// Optionally, navigate to app settings for manual permission control
|
||||
openAppSettings();
|
||||
},
|
||||
child: Text(
|
||||
"Open Settings".tr,
|
||||
style: const TextStyle(color: AppColor.blueColor),
|
||||
Widget _buildSocialButton({
|
||||
required IconData icon,
|
||||
required String text,
|
||||
required Color color,
|
||||
}) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(icon, color: Colors.white),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
text,
|
||||
style: const TextStyle(
|
||||
color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildEmailPasswordForm(LoginController controller) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.2),
|
||||
spreadRadius: 2,
|
||||
blurRadius: 5,
|
||||
offset: const Offset(0, 3),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Form(
|
||||
key: controller.formKey,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
TextFormField(
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
controller: controller.emailController,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Email'.tr,
|
||||
hintText: 'Your email address'.tr,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
validator: (value) => value == null ||
|
||||
value.isEmpty ||
|
||||
!value.contains('@') ||
|
||||
!value.contains('.')
|
||||
? 'Enter a valid email'.tr
|
||||
: null,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
TextFormField(
|
||||
obscureText: true,
|
||||
controller: controller.passwordController,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Password'.tr,
|
||||
hintText: 'Your password'.tr,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
validator: (value) => value == null || value.isEmpty
|
||||
? 'Enter your password'.tr
|
||||
: null,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
GetBuilder<LoginController>(
|
||||
builder: (controller) => controller.isloading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: ElevatedButton(
|
||||
onPressed: () {
|
||||
if (controller.formKey.currentState!.validate()) {
|
||||
controller.login();
|
||||
}
|
||||
},
|
||||
child: Text('Submit'.tr),
|
||||
),
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'Next'.tr,
|
||||
onPressed: () async {
|
||||
// if (box.read(BoxName.locationPermission) != 'true') {
|
||||
// Get.put(MyDialog()).getDialog(
|
||||
// 'Location Permission is requiered for find drivers'
|
||||
// .tr,
|
||||
// 'You can just manage your account!'.tr, () {
|
||||
// Get.back();
|
||||
// Get.to(() {
|
||||
// PassengerProfilePage();
|
||||
// });
|
||||
// });
|
||||
// } else {
|
||||
await controller.getLocationPermission();
|
||||
// }
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildAgreementPage(LoginController controller) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ListTile(
|
||||
leading: Image.asset('assets/images/notepad.png', width: 40),
|
||||
title: Text('Terms of Use & Privacy Notice'.tr,
|
||||
style: AppStyle.headTitle2),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RichText(
|
||||
textAlign: TextAlign.left,
|
||||
text: TextSpan(
|
||||
style: AppStyle.title,
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text:
|
||||
'By selecting "I Agree" below, I confirm that I have read and agree to the '
|
||||
.tr),
|
||||
TextSpan(
|
||||
text: 'Terms of Use'.tr,
|
||||
style: const TextStyle(
|
||||
decoration: TextDecoration.underline,
|
||||
color: AppColor.blueColor),
|
||||
),
|
||||
const TextSpan(text: ' and acknowledge the '),
|
||||
TextSpan(
|
||||
text: 'Privacy Notice'.tr,
|
||||
style: const TextStyle(
|
||||
decoration: TextDecoration.underline,
|
||||
color: AppColor.blueColor),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
Get.defaultDialog(
|
||||
title: 'Privacy Notice'.tr,
|
||||
content: const SizedBox(
|
||||
height: 400,
|
||||
width: 400,
|
||||
child: SingleChildScrollView(
|
||||
child: HtmlWidget(AppInformation.privacyPolicy),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
kolor: AppColor.greenColor,
|
||||
)
|
||||
],
|
||||
),
|
||||
TextSpan(text: '. I am at least 18 years old.'.tr),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 40),
|
||||
Row(
|
||||
children: [
|
||||
Checkbox(
|
||||
value: controller.isAgreeTerms,
|
||||
onChanged: (newValue) => controller.changeAgreeTerm(),
|
||||
activeColor: AppColor.primaryColor,
|
||||
),
|
||||
Text('I Agree'.tr, style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
onPressed: controller.isAgreeTerms
|
||||
? () => controller.saveAgreementTerms()
|
||||
: null,
|
||||
child: Text('Continue'.tr),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildLocationPermissionDialog(LoginController controller) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(32),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.location_on, size: 60, color: AppColor.primaryColor),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
'Enable Location Access'.tr,
|
||||
style: AppStyle.headTitle2,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
'We need your location to find nearby drivers for pickups and drop-offs.'
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
ElevatedButton(
|
||||
onPressed: () async => await controller.getLocationPermission(),
|
||||
child: Text('Allow Location Access'.tr),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => openAppSettings(),
|
||||
child: Text('Open Settings'.tr),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildCountryPicker() {
|
||||
return CountryPicker();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user