diff --git a/lib/appLocalization/language_key.dart b/lib/appLocalization/language_key.dart index 8e63a8c68da90dc5e407c0e017d671671771f0e5..307a03de8dd4319c8c2271a0fcf21263277a06f2 100644 --- a/lib/appLocalization/language_key.dart +++ b/lib/appLocalization/language_key.dart @@ -5,8 +5,9 @@ const String name = "name"; ///Verify otp texts const String otpTitle = "otpTitle"; const String otpSubTitle = "otpSubTitle"; -const String enterOtp = "enterOtp"; -const String resendOtp = "resendOtp"; +const String enterOTP = "enterOTP"; +const String resendOTPIn = "resendOTPIn"; +const String resendOTP = "resendOTP"; const String verify = "verify"; const String back = "back"; const String verifySuccessTitle = "verifySuccessTitle"; diff --git a/lib/appLocalization/languages.dart b/lib/appLocalization/languages.dart index a75cf25d74383cd9a80ba6dab8cc989e18566458..3c4fc5f59e5343e4d6122983be62f67331522063 100644 --- a/lib/appLocalization/languages.dart +++ b/lib/appLocalization/languages.dart @@ -17,8 +17,9 @@ class Languages extends Translations { ///Verify otp screen otpTitle:"Verify OTP", otpSubTitle:"Please verify the OTP which have been sent your registered mobile number.", - enterOtp:"Enter OTP", - resendOtp: "Resend OTP in ", + enterOTP:"Enter OTP", + resendOTPIn: "Resend OTP in ", + resendOTP: "Resend OTP", seconds: "seconds.", verify: "Verify", back: "Back", @@ -36,8 +37,9 @@ class Languages extends Translations { ///Verify otp screen otpTitle:"ओटीपी सत्यापित करें", otpSubTitle:"कृपया उस ओटीपी को सत्यापित करें जो आपके पंजीकृत मोबाइल नंबर पर भेजा गया है।", - enterOtp:"ओटीपी दर्ज करें", - resendOtp:"ओटीपी दोबारा भेजें", + enterOTP:"ओटीपी दर्ज करें", + resendOTPIn:"ओटीपी दोबारा भेजें", + resendOTP: "ओटीपी दोबारा भेजें", seconds:"सेकंड में ", verify: "सत्यापित करें", back: "पीछे", diff --git a/lib/constants/app_constants.dart b/lib/constants/app_constants.dart index c79b464243c12c1fd9b8793ec59d46f0e102ba3b..953a1bc1f02cff09cfb92d22c366e0df6c0e42c7 100644 --- a/lib/constants/app_constants.dart +++ b/lib/constants/app_constants.dart @@ -1,46 +1,10 @@ class AppConstants { - static const String login = "Login"; - static const String forgotPassword = "Forgot Password"; - static const String loginEmailInfo = "Enter your email address and"; - static const String loginPasswordInfo = "password to access your account"; + static String username = 'Exidehtptrans1'; + static String password = '_<P)>lnL0{'; - static const String sendEmail = "Send E-mail"; - static const String sendOtp = "Send OTP"; - static const String checkEmail = "Check your E-mail"; - static const String changePassword = "Change Password"; - static const String confirmOtp = "Confirm OTP"; - static const String otpMatched = "OTP matched successfully"; - static const String otpInfo = "We have sent a password recover instruction"; - static const String otpOtherInfo = "Didn't receive the OTP? Please wait for 5 min before resending the OTP"; - static const String otpSentInfo = "OTP sent successfully"; - static const String remainingTime = "Remaining time"; - static const String userName = "User_name"; - static const String userId = "user_id"; - static const String firstName = "First_name"; - static const String lastName = "Last_name"; - static const String avatarUrl = "avatar_url"; - static const String emailId = "Email_ID"; - static const String sessionToken = "Session_token"; - static const String joinSession = 'Join Session'; - static const String userRoles = "Role"; - static const String home = 'home'; - static const String na = "NA"; - static const String search = 'Search'; - - static const String nameError = "Please enter name"; - static const String emailIdError = "Please enter valid email id"; - static const String errorOccurred = "An error occurred. Please retry"; - static const String invalidEmailError = - "The email address you provided is not associated with any account"; - static const String passwordNotMatchError = "The new password and confirm password do not match"; - static const String passwordError = "Password is not valid"; - static const String mandatoryField = "*Mandatory Field"; - static const String internetError = "No Internet Connection"; - static const String noDataFoundError = "No data available"; - static const String noUserFoundError = "No user found"; +} - static const String uploadImageFailedError = "Image upload failed. Please retry"; - static const String communicationError = "Error occurred while Communication with Server with StatusCode"; - static const String validationError = "Incorrect email or password, please retry."; - static const String personaError = "Unauthorised user for mobile app, please login on web app"; +///Controller tags +class Tag { + static String verifyOtpControllerTag="verify_otp_controller"; } diff --git a/lib/controller/base_controller.dart b/lib/controller/base_controller.dart index 0aac3495b2087ae0677f457a6b8d24a02e2db27d..24630fd1516639ef761d6a0403337d874991f9c7 100644 --- a/lib/controller/base_controller.dart +++ b/lib/controller/base_controller.dart @@ -1,7 +1,6 @@ /* Created by Nitesh Kumar on 05/28/24 */ import 'dart:async'; -import 'dart:developer'; import 'dart:io' show Platform; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:dio/dio.dart'; @@ -26,15 +25,18 @@ class BaseController extends GetxController with WidgetsBindingObserver { RxBool isGeneralConfigLoading = false.obs; Completer<void> generalConfigFetchCompleter = Completer<void>(); - //verifyOtp + ///verifyOtp RxString generatedOtp="".obs; + //todo-Fetch the phone number from welcome screen + RxString userPhoneNumber="919945215727".obs; + + String encryptedSseId = ""; String userName = ""; String fullName = ""; String userDesignation = ""; String userEmail = ""; - String userPhoneNumber = ""; String empMobileNo = ""; String empWorkLocation = ""; String assetUrl = ""; diff --git a/lib/customWidget/app_text.dart b/lib/customWidget/app_text.dart index 21db7353cb22203798b19bdef9ff0fcbdcca8028..8e35f0dbf623281760ea52018fddb7085d006050 100644 --- a/lib/customWidget/app_text.dart +++ b/lib/customWidget/app_text.dart @@ -1,10 +1,11 @@ +import 'package:exide_crr/res/app_color_text_size.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import '../constants/font_constants.dart'; class AppText extends StatelessWidget { String text; - Color textColor; + Color textColor,underlineColor; double fontSize; FontWeight fontWeight; FontStyle fontStyle; @@ -24,7 +25,7 @@ class AppText extends StatelessWidget { // required this.lineHeight, this.maxLine=1, this.fontStyle = FontStyle.normal, - this.underLine = false, + this.underLine = false,this.underlineColor=AppColor.blackColor, this.isCurrency = false}) : super(key: key); @@ -40,7 +41,7 @@ class AppText extends StatelessWidget { fontWeight: fontWeight, fontStyle: fontStyle, // height: lineHeight, - color: textColor, + color: textColor,decorationColor:underlineColor, decoration: underLine ? TextDecoration.underline : TextDecoration.none), softWrap: softWrap, diff --git a/lib/utils/miscellaneous.dart b/lib/utils/miscellaneous.dart index bafa8040e8f2bb999b6affa80cda12e33a307315..76b24cc9bed751a296815328295544fc5e3ebae2 100644 --- a/lib/utils/miscellaneous.dart +++ b/lib/utils/miscellaneous.dart @@ -399,4 +399,10 @@ class Miscellaneous { } return double.tryParse(str) != null; } + + static String generateOTP() { + final math.Random random = math.Random(); + final int otp = 1000 + random.nextInt(9000); // Ensures a 4-digit number + return otp.toString(); + } } diff --git a/lib/utils/res/styles.dart b/lib/utils/res/styles.dart index d2990f4422ef9c69af4ecb0db343c43362b2e11e..f612e43de81f09a33c3f7d70347b7222848a4c05 100644 --- a/lib/utils/res/styles.dart +++ b/lib/utils/res/styles.dart @@ -200,4 +200,19 @@ class Styles { height: 1.0, color: AppColor.redLight, ); + +///Verify OTP + static TextStyle resendTextUnderline = GoogleFonts.getFont( + FontConstants.fontFamilyName, + fontSize: TextSize.textSmallSize, + fontWeight: FontWeight.w400, + color: AppColor.lightGrey,decoration: TextDecoration.underline,decorationColor:AppColor.redLight, + ); + + static TextStyle resendText = GoogleFonts.getFont( + FontConstants.fontFamilyName, + fontSize: TextSize.textSmallSize, + fontWeight: FontWeight.w400, + color: AppColor.lightGrey, + ); }