BASE: Imlement Localization In Auth.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'package:customer/constant/const_texts.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@@ -36,7 +38,7 @@ class ForgotPasswordScreen extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"Skip".tr,
|
||||
ConstTexts.skip.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -72,8 +74,7 @@ class ForgotPasswordScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Enter your registered email to receive a reset link."
|
||||
.tr,
|
||||
ConstTexts.enterYourregisteredEmail.tr(),
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
@@ -84,14 +85,14 @@ class ForgotPasswordScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
TextFieldWidget(
|
||||
title: "Email Address*".tr,
|
||||
hintText: "jerome014@gmail.com",
|
||||
title: ConstTexts.emailAddress.tr(),
|
||||
hintText: "abdusalom@gmail.com",
|
||||
controller: controller.emailEditingController.value,
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Send Link".tr,
|
||||
title: ConstTexts.sendLink.tr(),
|
||||
onPress: controller.forgotPassword,
|
||||
color:
|
||||
isDark
|
||||
@@ -111,7 +112,7 @@ class ForgotPasswordScreen extends StatelessWidget {
|
||||
child: Center(
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text: "Remember Password?".tr,
|
||||
text: ConstTexts.rememberPassword.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -120,7 +121,7 @@ class ForgotPasswordScreen extends StatelessWidget {
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "Log in".tr,
|
||||
text: ConstTexts.login.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: AppThemeData.ecommerce300,
|
||||
decoration: TextDecoration.underline,
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:customer/constant/const_texts.dart';
|
||||
import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart';
|
||||
import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@@ -36,7 +38,7 @@ class LoginScreen extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
"Skip".tr,
|
||||
ConstTexts.skip.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -70,8 +72,8 @@ class LoginScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
"Log in to explore your all in one vendor app favourites and shop effortlessly."
|
||||
.tr,
|
||||
ConstTexts.loginToExplore.tr()
|
||||
,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
@@ -82,15 +84,15 @@ class LoginScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
TextFieldWidget(
|
||||
title: "Email Address*".tr,
|
||||
hintText: "jerome014@gmail.com",
|
||||
title: ConstTexts.emailAddress.tr(),
|
||||
hintText: "abdusalom@gmail.com",
|
||||
controller: controller.emailController.value,
|
||||
focusNode: controller.emailFocusNode,
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(
|
||||
title: "Password*".tr,
|
||||
hintText: "Enter password".tr,
|
||||
title: ConstTexts.password.tr(),
|
||||
hintText: ConstTexts.enterPassword.tr(),
|
||||
controller: controller.passwordController.value,
|
||||
obscureText: controller.passwordVisible.value,
|
||||
focusNode: controller.passwordFocusNode,
|
||||
@@ -132,7 +134,7 @@ class LoginScreen extends StatelessWidget {
|
||||
() => const ForgotPasswordScreen(),
|
||||
),
|
||||
child: Text(
|
||||
"Forgot Password".tr,
|
||||
ConstTexts.forgotPassword.tr(),
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
color: AppThemeData.info400,
|
||||
),
|
||||
@@ -142,7 +144,7 @@ class LoginScreen extends StatelessWidget {
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Log in".tr,
|
||||
title: ConstTexts.login.tr(),
|
||||
onPress: controller.loginWithEmail,
|
||||
color:
|
||||
isDark
|
||||
@@ -167,7 +169,7 @@ class LoginScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
Text(
|
||||
"or continue with".tr,
|
||||
ConstTexts.orContinueWith.tr(),
|
||||
style: AppThemeData.regularTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -191,7 +193,7 @@ class LoginScreen extends StatelessWidget {
|
||||
const SizedBox(height: 25),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Mobile number".tr,
|
||||
title: ConstTexts.mobileNumber.tr(),
|
||||
onPress:
|
||||
() => Get.to(() => const MobileLoginScreen()),
|
||||
isRight: false,
|
||||
@@ -217,7 +219,7 @@ class LoginScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "with Google".tr,
|
||||
title: ConstTexts.withGoogle.tr(),
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.grey100
|
||||
@@ -241,7 +243,7 @@ class LoginScreen extends StatelessWidget {
|
||||
? Expanded(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "with Apple".tr,
|
||||
title: ConstTexts.withApple.tr(),
|
||||
isCenter: true,
|
||||
textColor:
|
||||
isDark
|
||||
@@ -272,7 +274,7 @@ class LoginScreen extends StatelessWidget {
|
||||
child: Center(
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text: "Didn't have an account?".tr,
|
||||
text: ConstTexts.dontHaveAccount.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -281,7 +283,7 @@ class LoginScreen extends StatelessWidget {
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "Sign up".tr,
|
||||
text: ConstTexts.signUp.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: AppThemeData.ecommerce300,
|
||||
decoration: TextDecoration.underline,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'package:country_code_picker/country_code_picker.dart';
|
||||
import 'package:customer/constant/const_texts.dart';
|
||||
import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart';
|
||||
import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@@ -53,7 +55,7 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"Skip".tr,
|
||||
ConstTexts.skip.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -89,8 +91,7 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Use your mobile number to Log in easily and securely."
|
||||
.tr,
|
||||
ConstTexts.useYourMobileNumber.tr(),
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
@@ -101,8 +102,8 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
TextFieldWidget(
|
||||
title: "Mobile Number*".tr,
|
||||
hintText: "Enter Mobile number".tr,
|
||||
title: ConstTexts.mobileNumber.tr(),
|
||||
hintText: ConstTexts.enterMobileNumber.tr(),
|
||||
controller: controller.mobileController.value,
|
||||
textInputType:
|
||||
const TextInputType.numberWithOptions(
|
||||
@@ -181,7 +182,7 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
const SizedBox(height: 30),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Send Code".tr,
|
||||
title: ConstTexts.sendCode.tr(),
|
||||
onPress: controller.sendOtp,
|
||||
color:
|
||||
isDark
|
||||
@@ -206,7 +207,7 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
Text(
|
||||
"or continue with".tr,
|
||||
ConstTexts.orContinueWith.tr(),
|
||||
style: AppThemeData.regularTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -228,7 +229,7 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
const SizedBox(height: 25),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Email address".tr,
|
||||
title: ConstTexts.emailAddress.tr(),
|
||||
onPress: () => Get.to(() => const SignUpScreen()),
|
||||
isRight: false,
|
||||
isCenter: true,
|
||||
@@ -256,7 +257,7 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
child: Center(
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text: "Didn't have an account?".tr,
|
||||
text: ConstTexts.dontHaveAccount.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -265,7 +266,7 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "Sign up".tr,
|
||||
text: ConstTexts.signUp.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: AppThemeData.ecommerce300,
|
||||
decoration: TextDecoration.underline,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import 'package:customer/constant/const_texts.dart';
|
||||
import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@@ -49,7 +51,7 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"Skip".tr,
|
||||
ConstTexts.skip.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -85,7 +87,7 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${"Enter the OTP sent to your mobile".tr} ${controller.countryCode} ${controller.maskPhoneNumber(controller.phoneNumber.value)}",
|
||||
"${ConstTexts.enterOtpSent.tr()} ${controller.countryCode} ${controller.maskPhoneNumber(controller.phoneNumber.value)}",
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
@@ -163,7 +165,7 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
controller.sendOTP();
|
||||
},
|
||||
child: Text(
|
||||
"Resend OTP".tr,
|
||||
ConstTexts.resendOTP.tr(),
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
color: AppThemeData.info400,
|
||||
fontSize: 16,
|
||||
@@ -178,7 +180,7 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
/// Verify Button
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Verify".tr,
|
||||
title: ConstTexts.verify.tr(),
|
||||
onPress: controller.verifyOtp,
|
||||
color:
|
||||
isDark
|
||||
@@ -198,7 +200,7 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
child: Center(
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text: "Didn't have an account?".tr,
|
||||
text: ConstTexts.dontHaveAccount.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -207,7 +209,7 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "Sign up".tr,
|
||||
text: ConstTexts.signUp.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: AppThemeData.ecommerce300,
|
||||
decoration: TextDecoration.underline,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:country_code_picker/country_code_picker.dart';
|
||||
import 'package:customer/constant/const_texts.dart';
|
||||
import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@@ -34,14 +36,33 @@ class SignUpScreen extends StatelessWidget {
|
||||
onPressed: () {
|
||||
Get.to(() => LocationPermissionScreen());
|
||||
},
|
||||
style: TextButton.styleFrom(padding: const EdgeInsets.symmetric(horizontal: 12), minimumSize: const Size(0, 40), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||
style: TextButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
minimumSize: const Size(0, 40),
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text("Skip".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
|
||||
Text(
|
||||
ConstTexts.skip.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 2),
|
||||
child: Icon(Icons.arrow_forward_ios, size: 16, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
|
||||
child: Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -57,62 +78,125 @@ class SignUpScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Sign up to explore all our services and start shopping, riding, and more.".tr,
|
||||
style: AppThemeData.boldTextStyle(fontSize: 24, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
ConstTexts.signUpToExplore.tr(),
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(child: TextFieldWidget(title: "First Name*".tr, hintText: "Jerome".tr, controller: controller.firstNameController.value)),
|
||||
Expanded(
|
||||
child: TextFieldWidget(
|
||||
title: ConstTexts.firstName.tr(),
|
||||
hintText: "Abdusalom",
|
||||
controller: controller.firstNameController.value,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(child: TextFieldWidget(title: "Last Name*".tr, hintText: "Bell".tr, controller: controller.lastNameController.value)),
|
||||
Expanded(
|
||||
child: TextFieldWidget(
|
||||
title: ConstTexts.lastName.tr(),
|
||||
hintText: "G'ayratov",
|
||||
controller: controller.lastNameController.value,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(
|
||||
title: "Email Address*".tr,
|
||||
hintText: "jerome014@gmail.com",
|
||||
title: ConstTexts.emailAddress.tr(),
|
||||
hintText: "abdusalom@gmail.com",
|
||||
controller: controller.emailController.value,
|
||||
focusNode: controller.emailFocusNode,
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(
|
||||
title: "Mobile Number*".tr,
|
||||
hintText: "Enter Mobile number".tr,
|
||||
enable: controller.type.value == "mobileNumber" ? false : true,
|
||||
title: ConstTexts.mobileNumber.tr(),
|
||||
hintText: ConstTexts.enterMobileNumber.tr(),
|
||||
enable:
|
||||
controller.type.value == "mobileNumber"
|
||||
? false
|
||||
: true,
|
||||
controller: controller.mobileController.value,
|
||||
textInputType: const TextInputType.numberWithOptions(signed: true, decimal: true),
|
||||
textInputType: const TextInputType.numberWithOptions(
|
||||
signed: true,
|
||||
decimal: true,
|
||||
),
|
||||
textInputAction: TextInputAction.done,
|
||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(10)],
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
LengthLimitingTextInputFormatter(10),
|
||||
],
|
||||
prefix: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CountryCodePicker(
|
||||
onChanged: (value) {
|
||||
controller.countryCodeController.value.text = value.dialCode ?? Constant.defaultCountryCode;
|
||||
controller.countryCodeController.value.text =
|
||||
value.dialCode ?? Constant.defaultCountryCode;
|
||||
},
|
||||
initialSelection: controller.countryCodeController.value.text.isNotEmpty ? controller.countryCodeController.value.text : Constant.defaultCountryCode,
|
||||
initialSelection:
|
||||
controller
|
||||
.countryCodeController
|
||||
.value
|
||||
.text
|
||||
.isNotEmpty
|
||||
? controller
|
||||
.countryCodeController
|
||||
.value
|
||||
.text
|
||||
: Constant.defaultCountryCode,
|
||||
showCountryOnly: false,
|
||||
showOnlyCountryWhenClosed: false,
|
||||
alignLeft: false,
|
||||
enabled: controller.type.value != "mobileNumber",
|
||||
textStyle: TextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : Colors.black),
|
||||
dialogTextStyle: TextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
searchStyle: TextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
dialogBackgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
textStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: Colors.black,
|
||||
),
|
||||
dialogTextStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
searchStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
dialogBackgroundColor:
|
||||
isDark
|
||||
? AppThemeData.surfaceDark
|
||||
: AppThemeData.surface,
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
// const Icon(Icons.keyboard_arrow_down_rounded, size: 24, color: AppThemeData.grey400),
|
||||
Container(height: 24, width: 1, color: AppThemeData.grey400),
|
||||
Container(
|
||||
height: 24,
|
||||
width: 1,
|
||||
color: AppThemeData.grey400,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(
|
||||
title: "Password*".tr,
|
||||
hintText: "Enter password".tr,
|
||||
title: ConstTexts.password.tr(),
|
||||
hintText: ConstTexts.enterPassword.tr(),
|
||||
controller: controller.passwordController.value,
|
||||
obscureText: controller.passwordVisible.value,
|
||||
focusNode: controller.passwordFocusNode,
|
||||
@@ -120,78 +204,142 @@ class SignUpScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
controller.passwordVisible.value = !controller.passwordVisible.value;
|
||||
controller.passwordVisible.value =
|
||||
!controller.passwordVisible.value;
|
||||
},
|
||||
child:
|
||||
controller.passwordVisible.value
|
||||
? SvgPicture.asset(
|
||||
"assets/icons/ic_password_show.svg",
|
||||
colorFilter: ColorFilter.mode(isDark ? AppThemeData.grey300 : AppThemeData.grey600, BlendMode.srcIn),
|
||||
colorFilter: ColorFilter.mode(
|
||||
isDark
|
||||
? AppThemeData.grey300
|
||||
: AppThemeData.grey600,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
)
|
||||
: SvgPicture.asset(
|
||||
"assets/icons/ic_password_close.svg",
|
||||
colorFilter: ColorFilter.mode(isDark ? AppThemeData.grey300 : AppThemeData.grey600, BlendMode.srcIn),
|
||||
colorFilter: ColorFilter.mode(
|
||||
isDark
|
||||
? AppThemeData.grey300
|
||||
: AppThemeData.grey600,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(
|
||||
title: "Confirm Password*".tr,
|
||||
hintText: "Enter confirm password".tr,
|
||||
title: ConstTexts.confirmPassword.tr(),
|
||||
hintText: ConstTexts.enterConfirmPassword.tr(),
|
||||
controller: controller.confirmPasswordController.value,
|
||||
obscureText: controller.conformPasswordVisible.value,
|
||||
suffix: Padding(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
controller.conformPasswordVisible.value = !controller.conformPasswordVisible.value;
|
||||
controller.conformPasswordVisible.value =
|
||||
!controller.conformPasswordVisible.value;
|
||||
},
|
||||
child:
|
||||
controller.conformPasswordVisible.value
|
||||
? SvgPicture.asset(
|
||||
"assets/icons/ic_password_show.svg",
|
||||
colorFilter: ColorFilter.mode(isDark ? AppThemeData.grey300 : AppThemeData.grey600, BlendMode.srcIn),
|
||||
colorFilter: ColorFilter.mode(
|
||||
isDark
|
||||
? AppThemeData.grey300
|
||||
: AppThemeData.grey600,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
)
|
||||
: SvgPicture.asset(
|
||||
"assets/icons/ic_password_close.svg",
|
||||
colorFilter: ColorFilter.mode(isDark ? AppThemeData.grey300 : AppThemeData.grey600, BlendMode.srcIn),
|
||||
colorFilter: ColorFilter.mode(
|
||||
isDark
|
||||
? AppThemeData.grey300
|
||||
: AppThemeData.grey600,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(title: "Referral Code".tr, hintText: "Enter referral code".tr, controller: controller.referralController.value),
|
||||
TextFieldWidget(
|
||||
title: ConstTexts.referralCode.tr(),
|
||||
hintText: ConstTexts.enterReferralCode.tr(),
|
||||
controller: controller.referralController.value,
|
||||
),
|
||||
const SizedBox(height: 40),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Sign up".tr,
|
||||
borderRadius: 10.r,
|
||||
title: ConstTexts.signUp.tr(),
|
||||
onPress: () => controller.signUp(),
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
textColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.surfaceDark
|
||||
: AppThemeData.surface,
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(width: 52, height: 1, color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey300),
|
||||
Container(
|
||||
width: 52,
|
||||
height: 1,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark400
|
||||
: AppThemeData.grey300,
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
Text("or continue with".tr, style: AppThemeData.regularTextStyle(color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey400)),
|
||||
Text(
|
||||
ConstTexts.orContinueWith.tr(),
|
||||
style: AppThemeData.regularTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark400
|
||||
: AppThemeData.grey400,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
Container(width: 52, height: 1, color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey300),
|
||||
Container(
|
||||
width: 52,
|
||||
height: 1,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark400
|
||||
: AppThemeData.grey300,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Mobile number".tr,
|
||||
borderRadius: 10.r,
|
||||
title: ConstTexts.mobileNumber.tr(),
|
||||
onPress: () => Get.to(() => const MobileLoginScreen()),
|
||||
isRight: false,
|
||||
isCenter: true,
|
||||
icon: Icon(Icons.mobile_friendly_outlined, size: 20, color: isDark ? AppThemeData.greyDark900 : null),
|
||||
icon: Icon(
|
||||
Icons.mobile_friendly_outlined,
|
||||
size: 20,
|
||||
color: isDark ? AppThemeData.greyDark900 : null,
|
||||
),
|
||||
//Image.asset(AppAssets.icMessage, width: 20, height: 18, color: isDark ? AppThemeData.greyDark900 : null),
|
||||
color: isDark ? AppThemeData.greyDark200 : AppThemeData.grey200,
|
||||
textColor: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark200
|
||||
: AppThemeData.grey200,
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
Padding(
|
||||
@@ -199,11 +347,16 @@ class SignUpScreen extends StatelessWidget {
|
||||
child: Center(
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text: "Already have an account?".tr,
|
||||
style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800),
|
||||
text: ConstTexts.alreadyHaveAccount.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark800
|
||||
: AppThemeData.grey800,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "Log in".tr,
|
||||
text: ConstTexts.login.tr(),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: AppThemeData.ecommerce300,
|
||||
decoration: TextDecoration.underline,
|
||||
|
||||
Reference in New Issue
Block a user