|
|
|
|
@ -191,9 +191,9 @@ class _SavedLogin extends State<SavedLogin> {
|
|
|
|
|
checkUserAuthentication(val);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Color(0xffFEE9EA),
|
|
|
|
|
backgroundColor: Color(0xffED1C2B),
|
|
|
|
|
borderColor: Color(0xffFEE9EA),
|
|
|
|
|
textColor: Color(0xffED1C2B),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
@ -217,37 +217,120 @@ class _SavedLogin extends State<SavedLogin> {
|
|
|
|
|
widget.savedLoginData.logInType != null && widget.savedLoginData.logInType != 1
|
|
|
|
|
? Column(
|
|
|
|
|
children: [
|
|
|
|
|
widget.savedLoginData.logInType !=1 ? CustomButton(
|
|
|
|
|
text: TranslationBase.of(context).loginByOTP,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
widget.savedLoginData.logInType = 1;
|
|
|
|
|
int? val = widget.savedLoginData.logInType!;
|
|
|
|
|
checkUserAuthentication(val);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
borderColor: Color(0xFF2E3039),
|
|
|
|
|
textColor: Color(0xFF2E3039),
|
|
|
|
|
borderWidth: 2,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 14, 0, 14),
|
|
|
|
|
icon: "assets/images/svg/password-validation.svg",
|
|
|
|
|
) : Container(),
|
|
|
|
|
widget.savedLoginData.logInType != 1
|
|
|
|
|
? CustomButton(
|
|
|
|
|
text: TranslationBase.of(context).loginByOTP,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
showModalBottomSheet(
|
|
|
|
|
context: context,
|
|
|
|
|
isScrollControlled: true,
|
|
|
|
|
isDismissible: false,
|
|
|
|
|
useSafeArea: true,
|
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
|
enableDrag: false,
|
|
|
|
|
// Prevent dragging to avoid focus conflicts
|
|
|
|
|
builder: (bottomSheetContext) => StatefulBuilder(builder: (BuildContext context, StateSetter setModalState) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.only(bottom: MediaQuery.of(bottomSheetContext).viewInsets.bottom),
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: GenericBottomSheet(
|
|
|
|
|
countryCode: selectedCountry.countryCode,
|
|
|
|
|
initialPhoneNumber: phoneNumber != null ? phoneNumber : "",
|
|
|
|
|
textController: phoneController,
|
|
|
|
|
isFromSavedLogin: true,
|
|
|
|
|
isEnableCountryDropdown: true,
|
|
|
|
|
onCountryChange: (value) {
|
|
|
|
|
selectedCountry = value;
|
|
|
|
|
setModalState(() {});
|
|
|
|
|
},
|
|
|
|
|
onChange: (String? value) {
|
|
|
|
|
phoneNumber = value;
|
|
|
|
|
},
|
|
|
|
|
buttons: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(bottom: 10),
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: TranslationBase.of(context).sendOTPSMS,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
// int? val = Utils.onOtpBtnPressed(OTPType.sms, phoneNumber, context);
|
|
|
|
|
// if (val != null) checkUserAuthentication(val);
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
widget.savedLoginData.logInType = 1;
|
|
|
|
|
int? val = widget.savedLoginData.logInType!;
|
|
|
|
|
checkUserAuthentication(val);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: CustomColors.bgRedColor,
|
|
|
|
|
borderColor: CustomColors.bgRedBorderColor,
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
icon: "assets/images/svg/message.svg",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).oR,
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
color: Color(0xFF2E3039),
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(bottom: 10, top: 10),
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: TranslationBase.of(context).sendOTPWHATSAPP,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
widget.savedLoginData.logInType = 4;
|
|
|
|
|
int? val = widget.savedLoginData.logInType!;
|
|
|
|
|
checkUserAuthentication(val);
|
|
|
|
|
|
|
|
|
|
// int? val = Utils.onOtpBtnPressed(OTPType.whatsapp, phoneNumber, context);
|
|
|
|
|
// if (val != null) checkUserAuthentication(val);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
borderColor: Color(0xFF2E3039),
|
|
|
|
|
textColor: Color(0xFF2E3039),
|
|
|
|
|
icon: "assets/images/svg/whatsapp.svg",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
borderColor: Color(0xFF2E3039),
|
|
|
|
|
textColor: Color(0xFF2E3039),
|
|
|
|
|
borderWidth: 2,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 14, 0, 14),
|
|
|
|
|
icon: "assets/images/svg/password-validation.svg",
|
|
|
|
|
)
|
|
|
|
|
: Container(),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
widget.savedLoginData.logInType !=4 ? CustomButton(
|
|
|
|
|
text: "${TranslationBase.of(context).loginBy} ${getType(4, context)}",
|
|
|
|
|
onPressed: () {
|
|
|
|
|
widget.savedLoginData.logInType = 4;
|
|
|
|
|
int? val = widget.savedLoginData.logInType!;
|
|
|
|
|
checkUserAuthentication(val);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
borderColor: Color(0xFF2E3039),
|
|
|
|
|
textColor: Color(0xFF2E3039),
|
|
|
|
|
borderWidth: 2,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 14, 0, 14),
|
|
|
|
|
icon: "assets/images/svg/whatsapp.svg",
|
|
|
|
|
) : Container(),
|
|
|
|
|
// widget.savedLoginData.logInType !=4 ? CustomButton(
|
|
|
|
|
// text: "${TranslationBase.of(context).loginBy} ${getType(4, context)}",
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// widget.savedLoginData.logInType = 4;
|
|
|
|
|
// int? val = widget.savedLoginData.logInType!;
|
|
|
|
|
// checkUserAuthentication(val);
|
|
|
|
|
// },
|
|
|
|
|
// backgroundColor: Colors.white,
|
|
|
|
|
// borderColor: Color(0xFF2E3039),
|
|
|
|
|
// textColor: Color(0xFF2E3039),
|
|
|
|
|
// borderWidth: 2,
|
|
|
|
|
// padding: EdgeInsets.fromLTRB(0, 14, 0, 14),
|
|
|
|
|
// icon: "assets/images/svg/whatsapp.svg",
|
|
|
|
|
// ) : Container(),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: CustomButton(
|
|
|
|
|
@ -276,33 +359,78 @@ class _SavedLogin extends State<SavedLogin> {
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
TextButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).pushReplacement(
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (BuildContext context) => LandingPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).guest,
|
|
|
|
|
style: context.dynamicTextStyle(color: CustomColors.bgRedColor, fontSize: 16, fontWeight: FontWeight.w500, height: 16 / 26),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 56,
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: TranslationBase.of(context).guest,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).pushReplacement(
|
|
|
|
|
MaterialPageRoute(builder: (BuildContext context) => LandingPage()),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Color(0xffFEE9EA),
|
|
|
|
|
borderColor: Color(0xffFEE9EA),
|
|
|
|
|
textColor: Color(0xffED1C2B),
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
|
|
|
|
|
// icon: "assets/images/svg/apple-finder.svg",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(width: 24),
|
|
|
|
|
TextButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).pushReplacement(
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (BuildContext context) => WelcomeLogin(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).switchAccount,
|
|
|
|
|
style: context.dynamicTextStyle(color: CustomColors.bgRedColor, fontSize: 16, fontWeight: FontWeight.w500, height: 16 / 26),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 24,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 56,
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: TranslationBase.of(context).switchAccount,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).pushReplacement(
|
|
|
|
|
MaterialPageRoute(builder: (BuildContext context) => WelcomeLogin()),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Color(0xffFEE9EA),
|
|
|
|
|
borderColor: Color(0xffFEE9EA),
|
|
|
|
|
textColor: Color(0xffED1C2B),
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
|
|
|
|
|
// icon: "assets/images/svg/apple-finder.svg",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// TextButton(
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// Navigator.of(context).pushReplacement(
|
|
|
|
|
// MaterialPageRoute(
|
|
|
|
|
// builder: (BuildContext context) => LandingPage(),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
// },
|
|
|
|
|
// child: Text(
|
|
|
|
|
// TranslationBase.of(context).guest,
|
|
|
|
|
// style: context.dynamicTextStyle(color: CustomColors.bgRedColor, fontSize: 16, fontWeight: FontWeight.w500, height: 16 / 26),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// const SizedBox(width: 24),
|
|
|
|
|
// TextButton(
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// Navigator.of(context).pushReplacement(
|
|
|
|
|
// MaterialPageRoute(
|
|
|
|
|
// builder: (BuildContext context) => WelcomeLogin(),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
// },
|
|
|
|
|
// child: Text(
|
|
|
|
|
// TranslationBase.of(context).switchAccount,
|
|
|
|
|
// style: context.dynamicTextStyle(color: CustomColors.bgRedColor, fontSize: 16, fontWeight: FontWeight.w500, height: 16 / 26),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
|
|