Skip to content
Snippets Groups Projects
Commit f6f8c68a authored by Rakshitha Salian's avatar Rakshitha Salian
Browse files

Common function,styles,constants

parent 6259a560
Branches
No related tags found
1 merge request!2Verify OTP screen- FE -ECAP1-24
......@@ -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";
......
......@@ -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: "पीछे",
......
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";
}
/* 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 = "";
......
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,
......
......@@ -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();
}
}
......@@ -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,
);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment