New UI Implemented Fix 2

mirza_dev
mirza.shafique 3 years ago
parent a2d12db77d
commit 8fea020fc8

@ -0,0 +1,26 @@
<svg width="375" height="812" viewBox="0 0 375 812" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2_18)">
<rect width="375" height="812" rx="24" fill="white"/>
<g filter="url(#filter0_f_2_18)">
<circle cx="17" cy="55" r="138" fill="#F58C21" fill-opacity="0.11"/>
</g>
<g filter="url(#filter1_f_2_18)">
<circle cx="306" cy="223" r="138" fill="#F58C21" fill-opacity="0.11"/>
</g>
</g>
<defs>
<filter id="filter0_f_2_18" x="-297" y="-259" width="628" height="628" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="88" result="effect1_foregroundBlur_2_18"/>
</filter>
<filter id="filter1_f_2_18" x="-8" y="-91" width="628" height="628" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="88" result="effect1_foregroundBlur_2_18"/>
</filter>
<clipPath id="clip0_2_18">
<rect width="375" height="812" rx="24" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

@ -42,7 +42,12 @@ extension EmailValidator on String {
style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.52, decoration: isUnderLine ? TextDecoration.underline : null), style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.52, decoration: isUnderLine ? TextDecoration.underline : null),
); );
Widget toText14({Color? color, bool isBold = false, TextAlign? textAlign,}) => Text( Widget toText14({
Color? color,
bool isBold = false,
TextAlign? textAlign,
}) =>
Text(
this, this,
textAlign: textAlign, textAlign: textAlign,
style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 14, letterSpacing: -0.48, fontWeight: isBold ? FontWeight.bold : FontWeight.w600), style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 14, letterSpacing: -0.48, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
@ -58,9 +63,16 @@ extension EmailValidator on String {
style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 17, letterSpacing: -0.68, fontWeight: isBold ? FontWeight.bold : FontWeight.w600), style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 17, letterSpacing: -0.68, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
); );
Widget toText20({Color? color, bool isBold = false}) => Text( Widget toText20({Color? color, bool isBold = false, FontWeight? fontWeight}) => Text(
this, this,
style: TextStyle(height: 23 / 24, color: color ?? MyColors.darkTextColor, fontSize: 20, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600), style: TextStyle(
height: 23 / 24,
color: color ?? MyColors.darkTextColor,
fontSize: 20,
letterSpacing: -1.44,
fontWeight: fontWeight ?? (isBold
? FontWeight.bold
: FontWeight.w600)),
); );
Widget toText22({Color? color, bool isBold = false}) => Text( Widget toText22({Color? color, bool isBold = false}) => Text(

@ -16,7 +16,7 @@ class CodegenLoader extends AssetLoader{
static const Map<String,dynamic> ar_SA = { static const Map<String,dynamic> ar_SA = {
"firstTimeLogIn": "تسجيل الدخول لأول مره", "firstTimeLogIn": "تسجيل الدخول لأول مره",
"signUp": "تسجيل دخول", "signUp": "التسجيل",
"changeMobile": "تغيير رقم الجوال", "changeMobile": "تغيير رقم الجوال",
"notifications": "الاشعارات", "notifications": "الاشعارات",
"general": "عام", "general": "عام",
@ -26,6 +26,7 @@ class CodegenLoader extends AssetLoader{
"retrievePassword": "استرجاع كلمة المرور", "retrievePassword": "استرجاع كلمة المرور",
"changeEmail": "تغيير الايميل", "changeEmail": "تغيير الايميل",
"verify": "تحقق", "verify": "تحقق",
"verified": "تم التحقق",
"signOut": "تسجيل خروج", "signOut": "تسجيل خروج",
"enterEmail": "ادخل الايميل", "enterEmail": "ادخل الايميل",
"enterNewEmail": "ادخل ايميل جديد", "enterNewEmail": "ادخل ايميل جديد",
@ -45,16 +46,28 @@ class CodegenLoader extends AssetLoader{
"createPass": "انشاء كلمة مرور جديده *", "createPass": "انشاء كلمة مرور جديده *",
"newPassword": " كلمة مرور جديده", "newPassword": " كلمة مرور جديده",
"forgetPassword": "نسيت كلمة المرور", "forgetPassword": "نسيت كلمة المرور",
"forgetPasswordQ": "نسيت كلمة المرور؟",
"recover": "استعادة",
"forgetPasswordRecover": "نسيت كلمة المرور؟ استعادة",
"editAccount": "تعديل الحساب", "editAccount": "تعديل الحساب",
"change": "تغيير", "change": "تغيير",
"verifyAccount": "التحقق من الحساب", "verifyAccount": "التحقق من الحساب",
"login": "تسجيل دخول", "login": "تسجيل دخول",
"log_in": "تسجيل الدخول",
"welcomeMessage": "مرحبا", "welcomeMessage": "مرحبا",
"welcomeDes": "أنت مكان واحد لكل ما تحتاجه سيارتك",
"forgetPass": "نسيت كلمة المرور ؟", "forgetPass": "نسيت كلمة المرور ؟",
"enterPhoneNumber": "رقم جوال ", "enterPhoneNumber": "رقم جوال ",
"phoneNumberVerified": "تم التحقق من الجوال", "phoneNumberVerified": "تم التحقق من الجوال",
"verifyNewPassword": "التحقق من كلمة المرور", "verifyNewPassword": "التحقق من كلمة المرور",
"EnterPass": "ادخل كلمة المرور", "EnterPass": "ادخل كلمة المرور",
"send": "إرسال",
"retrivePassword": "استرجع كلمة المرور بإحدى الطرق التالية",
"retriveOnPhone": "سوف نرسل الاختيار إلى رقم هاتفك المحمول المسجل",
"retriveOnEmail": "سوف نرسل الاختيار إلى عنوان بريدك الإلكتروني المسجل",
"enterPhoneForVerfication": "الرجاء إدخال رقم هاتفك وسنرسل لك رمز التحقق",
"selectYourCountry": "اختر بلدك",
"welcomeBack": "مرحبًا بعودتك!!!",
"alreadySigned": " تم تسجيل الدخول", "alreadySigned": " تم تسجيل الدخول",
"emailChangedSuccessfully": "تم تغيير الايميل بنجاح", "emailChangedSuccessfully": "تم تغيير الايميل بنجاح",
"passwordIsUpdated": "تم تحجيث كلمة المرور", "passwordIsUpdated": "تم تحجيث كلمة المرور",
@ -90,6 +103,7 @@ class CodegenLoader extends AssetLoader{
"defineProviders": "تحديد الموفرين", "defineProviders": "تحديد الموفرين",
"closeAccount": "اغلاق الحساب", "closeAccount": "اغلاق الحساب",
"createBranch": "انشاء فرع", "createBranch": "انشاء فرع",
"updateBranch": "فرع التحديث",
"address": "العنوان", "address": "العنوان",
"branchDescription": "وصف الفرع", "branchDescription": "وصف الفرع",
"branchName": "اسم الفرع", "branchName": "اسم الفرع",
@ -99,7 +113,9 @@ class CodegenLoader extends AssetLoader{
"somethingWrong": "هناك خطأ ما", "somethingWrong": "هناك خطأ ما",
"documentsUploaded": "تم ارفاق الملف بنجاح", "documentsUploaded": "تم ارفاق الملف بنجاح",
"update": "تحديث", "update": "تحديث",
"termsOfService": "من خلال إنشاء حساب فإنك توافق على شروط الخدمة و\n سياسة الخصوصية", "termsOfService": "من خلال إنشاء حساب فإنك توافق على",
"terms": "بنود الخدمة وخصوصية السياسة",
"profileMsg": "أدخل التفاصيل أدناه وأكمل معلومات الملف الشخصي",
"branchInfo": "معلومات الفرع و الخدمات", "branchInfo": "معلومات الفرع و الخدمات",
"profileCompleted": "الملف الشخصي مكتمل", "profileCompleted": "الملف الشخصي مكتمل",
"selectLocationMap": "اختر الموقع", "selectLocationMap": "اختر الموقع",
@ -108,6 +124,15 @@ class CodegenLoader extends AssetLoader{
"completeProfile2": "اكمل الملف الشخصي 2/3", "completeProfile2": "اكمل الملف الشخصي 2/3",
"completeProfile3": "اكمل الملف الشخصي 3/3", "completeProfile3": "اكمل الملف الشخصي 3/3",
"userInformation": "معلومات المتسخدم", "userInformation": "معلومات المتسخدم",
"faceRecognition": "تحقق مع بصمة الوجه",
"fingerPrint": "تحقق مع بصمة الاصبع",
"whatsapp": "تحقق مع Whatsapp",
"SMS": "رسائل قصيره",
"selectRole": "حدد الدور",
"userRoleOrTitle": "عنوان المستخدم",
"codeSentToEmail": "تم ارسال الرمز للايميل",
"number": "موبايل",
"english": "English",
"provider": "Provider", "provider": "Provider",
"title": "Hello", "title": "Hello",
"msg": "Hello {} in the {} world ", "msg": "Hello {} in the {} world ",
@ -144,22 +169,48 @@ class CodegenLoader extends AssetLoader{
"female": "Hello girl :) {}" "female": "Hello girl :) {}"
} }
}, },
"reset_locale": "Reset Language" "reset_locale": "Reset Language",
"insert_otp_code": "ادخل الرمز",
"type_code": "الرجاء كتابة الرمز الذي أرسلناه إلى",
"resend_code": "أعد إرسال الرمز",
"check_code": "التحقق من الشفرة",
"time_will_expire": "إعادة إرسال الرمز بتنسيق",
"sec": "ثانية",
"no_city_available": "لا توجد مدينة متاحة لهذا البلد",
"branch_created": "تم إنشاء الفرع بنجاح",
"branch_updated": "تم تحديث الفرع بنجاح",
"branch_deleted": "تم حذف الفرع بنجاح",
"dashboard_main": "لوحة القيادة / الصفحة الرئيسية",
"logo_brand": "الشعار / العلامة التجارية",
"remove": "إزالة",
"no_branch": "لم يتم إضافة فرع حتى الآن",
"login_once": "الرجاء تسجيل الدخول مرة واحدة",
"defineLicenese": "تحميل التراخيص والشهادات",
"description": "وصف",
"attachFile": "أرفق ملف",
"branchLocation": "معلومات الفرع والموقع",
"tapToEdit": "انقر للتعديل",
"myServiceBranches": "فروع خدمتي",
"enter_licence_detail": "الرجاء إدخال تفاصيل السجلات التجارية وإرفاق صور الترخيص",
"country": "بلد",
"city": "مدينة",
"editServices": "تحرير الخدمات"
}; };
static const Map<String,dynamic> en_US = { static const Map<String,dynamic> en_US = {
"firstTimeLogIn": "First Time Log In", "firstTimeLogIn": "First Time Log In",
"signUp": "Sing Up", "signUp": "Register",
"changeMobile": "Change Mobile", "changeMobile": "Change Mobile",
"notifications": "Notifications", "notifications": "Notifications",
"general": "General", "general": "General",
"defineLicences": "Define Licences", "defineLicences": "Register Licences",
"dealershipSettings": "Dealership Settings", "dealershipSettings": "Dealership Settings",
"changePassword": "Change Password", "changePassword": "Change Password",
"retrievePassword": "Retrieve Password", "retrievePassword": "Retrieve Password",
"changeEmail": "Change Email", "changeEmail": "Change Email",
"verify": "Verify", "verify": "Verify",
"verified": "Verified",
"signOut": "Sign Out", "signOut": "Sign Out",
"enterEmail": "Enter Email", "enterEmail": "Enter Email and Password",
"enterNewEmail": "Enter New Email", "enterNewEmail": "Enter New Email",
"enterNewPassword": "Enter New Password", "enterNewPassword": "Enter New Password",
"enterCurrentPassword": "Enter Current Password", "enterCurrentPassword": "Enter Current Password",
@ -167,7 +218,7 @@ static const Map<String,dynamic> en_US = {
"confirm": "Confirm", "confirm": "Confirm",
"completeProfile": "Complete Profile", "completeProfile": "Complete Profile",
"enterNewPhoneNumber": "Enter New Phone Number", "enterNewPhoneNumber": "Enter New Phone Number",
"enterPhoneNumber": "Enter Phone Number", "enterPhoneNumber": "Enter the login credentials",
"continu": "Continue", "continu": "Continue",
"confirmPassword": "Confirm Password", "confirmPassword": "Confirm Password",
"createPassword": "Create Password", "createPassword": "Create Password",
@ -178,15 +229,27 @@ static const Map<String,dynamic> en_US = {
"createPass": "Create Password *", "createPass": "Create Password *",
"newPassword": "New Password", "newPassword": "New Password",
"forgetPassword": "Forget Password", "forgetPassword": "Forget Password",
"forgetPasswordQ": "Forget Password?",
"recover": "Recover",
"forgetPasswordRecover": "Forget Password? Recover",
"editAccount": "Edit Account", "editAccount": "Edit Account",
"change": "Change", "change": "Change",
"verifyAccount": "Verify Account", "verifyAccount": "Verify Account",
"login": "Log In", "login": "Login",
"welcomeMessage": "Welcome Message", "log_in": "Log In",
"welcomeMessage": "Welcome To Mowater",
"welcomeDes": "You one stop place all your car needs",
"forgetPass": "Forget Password ?", "forgetPass": "Forget Password ?",
"phoneNumberVerified": "Phone Number Verified", "phoneNumberVerified": "Phone Number Verified",
"verifyNewPassword": "Verify New Password", "verifyNewPassword": "Verify New Password",
"send": "Send",
"EnterPass": "Enter Password ?", "EnterPass": "Enter Password ?",
"retrivePassword": "Retrive password by one of following method",
"retriveOnPhone": "We will send the opt to your registered mobile number",
"retriveOnEmail": "We will send the opt to your registered email address",
"enterPhoneForVerfication": "Please enter your phone number We will send you the verification code",
"selectYourCountry": "Select Your Country",
"welcomeBack": "Welcome Back!!!",
"alreadySigned": " Already Signed Up and Logged In", "alreadySigned": " Already Signed Up and Logged In",
"emailChangedSuccessfully": "Email is Changed Successfully", "emailChangedSuccessfully": "Email is Changed Successfully",
"passwordIsUpdated": "Password is Updated", "passwordIsUpdated": "Password is Updated",
@ -222,16 +285,19 @@ static const Map<String,dynamic> en_US = {
"defineProviders": "Define Providers", "defineProviders": "Define Providers",
"closeAccount": "Close Account", "closeAccount": "Close Account",
"createBranch": "Create Branch", "createBranch": "Create Branch",
"updateBranch": "Update Branch",
"address": "Address", "address": "Address",
"branchDescription": "Branch Description", "branchDescription": "Branch Description",
"branchName": "Branch Name", "branchName": "Branch Name",
"chooseCity": "Choose City", "chooseCity": "Select City",
"chooseCountry": "Choose Country", "chooseCountry": "Choose Country",
"selectAttachment": "Select Attachment", "selectAttachment": "Select Attachment",
"somethingWrong": "Something went wrong", "somethingWrong": "Something went wrong",
"documentsUploaded": "Documents uploaded successfully", "documentsUploaded": "Documents uploaded successfully",
"update": "Update", "update": "Update",
"termsOfService": "By creating an account you agree to our Terms of Service and\n Privacy Policy", "termsOfService": "By creating an account you agree to our",
"terms": "Terms of Service and Privacy Policy",
"profileMsg": "Enter the details below and complete the profile info",
"branchInfo": "Branch Info and Services", "branchInfo": "Branch Info and Services",
"profileCompleted": "Profile is Completed", "profileCompleted": "Profile is Completed",
"selectLocationMap": "Select Location Map", "selectLocationMap": "Select Location Map",
@ -241,6 +307,15 @@ static const Map<String,dynamic> en_US = {
"completeProfile3": "Complete Profile 3/3", "completeProfile3": "Complete Profile 3/3",
"userInformation": "User Information", "userInformation": "User Information",
"provider": "Provider", "provider": "Provider",
"faceRecognition": "Face Recognition",
"fingerPrint": "Finger Print",
"whatsapp": "With Whatsapp",
"SMS": "With SMS",
"selectRole": "Choose Role",
"userRoleOrTitle": "User role or title",
"codeSentToEmail": "Code is sent to email",
"number": "Number",
"english": "عربي",
"title": "Hello", "title": "Hello",
"msg": "Hello {} in the {} world ", "msg": "Hello {} in the {} world ",
"msg_named": "{} are written in the {lang} language", "msg_named": "{} are written in the {lang} language",
@ -276,7 +351,32 @@ static const Map<String,dynamic> en_US = {
"female": "Hello girl :) {}" "female": "Hello girl :) {}"
} }
}, },
"reset_locale": "Reset Language" "reset_locale": "Reset Language",
"insert_otp_code": "Enter the code",
"type_code": "Please type the code we sent to",
"resend_code": "Resend Code",
"check_code": "Check Code",
"time_will_expire": "Resend code in",
"sec": "sec",
"no_city_available": "No City Available for this country",
"branch_created": "Branch is successfully created",
"branch_updated": "Branch is successfully Updated",
"branch_deleted": "Branch is successfully Deleted",
"dashboard_main": "Dashboard/Main Page",
"logo_brand": "Logo/Brand",
"remove": "Remove",
"no_branch": "No Branch Added Yet",
"login_once": "Please login once",
"defineLicenese": "Upload Licenses and Certificates",
"description": "Description",
"attachFile": "Attach File",
"branchLocation": "Branch info and Location",
"tapToEdit": "Tap to edit",
"myServiceBranches": "My Service Branches",
"enter_licence_detail": "Please enter the detail for commercial records and attach the license images",
"country": "country",
"city": "city",
"editServices": "Edit Services"
}; };
static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US}; static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US};
} }

@ -32,6 +32,8 @@ abstract class LocaleKeys {
static const createPass = 'createPass'; static const createPass = 'createPass';
static const newPassword = 'newPassword'; static const newPassword = 'newPassword';
static const forgetPassword = 'forgetPassword'; static const forgetPassword = 'forgetPassword';
static const forgetPasswordQ = 'forgetPasswordQ';
static const recover = 'recover';
static const forgetPasswordRecover = 'forgetPasswordRecover'; static const forgetPasswordRecover = 'forgetPasswordRecover';
static const editAccount = 'editAccount'; static const editAccount = 'editAccount';
static const change = 'change'; static const change = 'change';
@ -116,6 +118,7 @@ abstract class LocaleKeys {
static const userRoleOrTitle = 'userRoleOrTitle'; static const userRoleOrTitle = 'userRoleOrTitle';
static const codeSentToEmail = 'codeSentToEmail'; static const codeSentToEmail = 'codeSentToEmail';
static const number = 'number'; static const number = 'number';
static const phoneNumber = 'phoneNumber';
static const english = 'english'; static const english = 'english';
static const provider = 'provider'; static const provider = 'provider';
static const title = 'title'; static const title = 'title';

@ -266,8 +266,8 @@ class _DashboardPageState extends State<DashboardPage> {
showDialog<ImageSource>( showDialog<ImageSource>(
context: context, context: context,
builder: (context) => AlertDialog(content: Text("Choose image source"), actions: [ builder: (context) => AlertDialog(content: Text("Choose image source"), actions: [
FlatButton(child: Text("Camera"), onPressed: () => cameraImage()), TextButton(child: Text("Camera"), onPressed: () => cameraImage()),
FlatButton(child: Text("Gallery"), onPressed: () => gallaryImage()), TextButton(child: Text("Gallery"), onPressed: () => gallaryImage()),
]), ]),
// .then((ImageSource source) async { // .then((ImageSource source) async {
// if (source != null) { // if (source != null) {

@ -53,7 +53,12 @@ class _EditAccountPageState extends State<EditAccountPage> {
), ),
20.width, 20.width,
Expanded(child: LocaleKeys.changePassword.tr().toText12(isBold: true)), Expanded(child: LocaleKeys.changePassword.tr().toText12(isBold: true)),
RaisedButton( ElevatedButton(
style: ElevatedButton.styleFrom(
textStyle: const TextStyle(color: Colors.white),
backgroundColor: MyColors.darkPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8),
),
onPressed: () { onPressed: () {
navigateWithName(context, AppRoutes.changePassword); navigateWithName(context, AppRoutes.changePassword);
}, },
@ -64,9 +69,6 @@ class _EditAccountPageState extends State<EditAccountPage> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
color: MyColors.darkPrimaryColor,
textColor: Colors.white,
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8),
), ),
], ],
), ),
@ -84,7 +86,12 @@ class _EditAccountPageState extends State<EditAccountPage> {
Expanded(child: LocaleKeys.changeMobile.tr().toText12(isBold: true)), Expanded(child: LocaleKeys.changeMobile.tr().toText12(isBold: true)),
LocaleKeys.verify.tr().toText12(color: Colors.green), LocaleKeys.verify.tr().toText12(color: Colors.green),
20.width, 20.width,
RaisedButton( ElevatedButton(
style: ElevatedButton.styleFrom(
textStyle: const TextStyle(color: Colors.white),
backgroundColor: MyColors.darkPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8),
),
onPressed: () { onPressed: () {
navigateWithName(context, AppRoutes.changeMobilePage); navigateWithName(context, AppRoutes.changeMobilePage);
}, },
@ -95,9 +102,6 @@ class _EditAccountPageState extends State<EditAccountPage> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
textColor: Colors.white,
color: MyColors.darkPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8),
) )
], ],
), ),
@ -122,7 +126,12 @@ class _EditAccountPageState extends State<EditAccountPage> {
}, },
), ),
20.width, 20.width,
RaisedButton( ElevatedButton(
style: ElevatedButton.styleFrom(
textStyle: const TextStyle(color: Colors.white),
backgroundColor: MyColors.darkPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8),
),
onPressed: () { onPressed: () {
navigateWithName(context, AppRoutes.changeEmailPage); navigateWithName(context, AppRoutes.changeEmailPage);
}, },
@ -133,9 +142,7 @@ class _EditAccountPageState extends State<EditAccountPage> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
textColor: Colors.white, ),
color: MyColors.darkPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8))
], ],
) )

@ -41,7 +41,7 @@ class _ForgetPasswordPageState extends State<ForgetPasswordPage> {
int otpType = 1; int otpType = 1;
String userName = ""; String userName = "";
ClassType type = ClassType.NUMBER; ClassType type = ClassType.EMAIL;
Country? _country; Country? _country;
String countryCode = ""; String countryCode = "";

@ -39,7 +39,7 @@ class LoginWithPassword extends StatefulWidget {
class _LoginWithPasswordState extends State<LoginWithPassword> { class _LoginWithPasswordState extends State<LoginWithPassword> {
int otpType = 1; int otpType = 1;
ClassType type = ClassType.NUMBER; ClassType type = ClassType.EMAIL;
String phoneNum = "", password = ""; String phoneNum = "", password = "";
String email = ""; String email = "";
String countryCode = ""; String countryCode = "";
@ -69,11 +69,11 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
children: [ children: [
12.height, 12.height,
LocaleKeys.login.tr().toText20(), LocaleKeys.login.tr().toText20(),
20.height, // 20.height,
(type == ClassType.NUMBER ? LocaleKeys.enterPhoneNumber.tr() : LocaleKeys.enterEmail.tr()).toText14( // (type == ClassType.NUMBER ? LocaleKeys.enterPhoneNumber.tr() : LocaleKeys.enterEmail.tr()).toText14(
color: MyColors.lightTextColor, // color: MyColors.lightTextColor,
textAlign: TextAlign.center, // textAlign: TextAlign.center,
), // ),
30.height, 30.height,
LoginEmailTab( LoginEmailTab(
onSelection: (ClassType type) { onSelection: (ClassType type) {
@ -108,12 +108,14 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
), ),
], ],
), ),
10.height, 20.height,
LocaleKeys.forgetPasswordQ.tr().toText14(color: MyColors.textColor),
ShowFillButton( ShowFillButton(
title: LocaleKeys.forgetPasswordRecover.tr(), title: LocaleKeys.recover.tr(),
isFlatButton: true, isFlatButton: true,
isBold: false, isBold: false,
fontSize: 14, fontSize: 14,
maxHeight: 24,
txtColor: MyColors.darkPrimaryColor, txtColor: MyColors.darkPrimaryColor,
onPressed: () { onPressed: () {
navigateWithName(context, AppRoutes.forgetPassword); navigateWithName(context, AppRoutes.forgetPassword);

@ -20,14 +20,23 @@ import 'package:car_provider_app/extensions/widget_extensions.dart';
import 'package:car_provider_app/widgets/txt_field.dart'; import 'package:car_provider_app/widgets/txt_field.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:sizer/sizer.dart';
import '../../classes/colors.dart'; import '../../classes/colors.dart';
import '../../generated/locale_keys.g.dart'; import '../../generated/locale_keys.g.dart';
class RegisterPage extends StatelessWidget { class RegisterPage extends StatefulWidget {
@override
State<RegisterPage> createState() => _RegisterPageState();
}
class _RegisterPageState extends State<RegisterPage> {
String phoneNum = "", countryCode = ""; String phoneNum = "", countryCode = "";
int role = -1, countryId = -1; int role = -1, countryId = -1;
TextEditingController emailController = TextEditingController();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@ -55,7 +64,7 @@ class RegisterPage extends StatelessWidget {
if (snapshot.hasData) { if (snapshot.hasData) {
List<DropValue> dropList = []; List<DropValue> dropList = [];
snapshot.data?.data?.forEach((element) { snapshot.data?.data?.forEach((element) {
dropList.add(new DropValue(element.id ?? 0, EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" ? element.roleNameN ?? "" : element.roleName ?? "", "")); dropList.add(DropValue(element.id ?? 0, EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" ? element.roleNameN ?? "" : element.roleName ?? "", ""));
}); });
return DropdownField((DropValue value) { return DropdownField((DropValue value) {
role = value.id; role = value.id;
@ -72,7 +81,7 @@ class RegisterPage extends StatelessWidget {
if (snapshot.hasData) { if (snapshot.hasData) {
List<DropValue> dropList = []; List<DropValue> dropList = [];
snapshot.data?.data?.forEach((element) { snapshot.data?.data?.forEach((element) {
dropList.add(new DropValue( dropList.add(DropValue(
element.id ?? 0, element.id ?? 0,
EasyLocalization.of(context)?.currentLocale?.countryCode == "SA" EasyLocalization.of(context)?.currentLocale?.countryCode == "SA"
? (element.countryNameN ?? "") + " " + (element.countryCode ?? "") ? (element.countryNameN ?? "") + " " + (element.countryCode ?? "")
@ -86,10 +95,16 @@ class RegisterPage extends StatelessWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
10.height, 10.height,
DropdownField((DropValue value) { DropdownField(
(DropValue value) {
setState(() {
countryCode = value.subValue; countryCode = value.subValue;
countryId = value.id; countryId = value.id;
}, list: dropList, hint: LocaleKeys.chooseCountry.tr()), });
},
list: dropList,
hint: LocaleKeys.chooseCountry.tr(),
),
], ],
); );
} else { } else {
@ -103,12 +118,54 @@ class RegisterPage extends StatelessWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
10.height, 10.height,
TxtField( Row(
hint: "5********", mainAxisAlignment: MainAxisAlignment.center,
value: phoneNum, crossAxisAlignment: CrossAxisAlignment.center,
children: [
mExp(1),
Expanded(
flex: 3,
child: Row(
children: [
Text(
(countryCode.isEmpty ? "+00" : "+" + countryCode),
style: const TextStyle(
fontSize: 20,
color: MyColors.black,
fontWeight: FontWeight.bold,
),
),
const Text(
" | ",
style: TextStyle(
fontSize: 20,
color: MyColors.black,
fontWeight: FontWeight.bold,
),
),
Flexible(
child: TextField(
controller: emailController,
onChanged: (v){ onChanged: (v){
phoneNum=v; phoneNum=v;
}, },
style: const TextStyle(
fontSize: 20,
color: MyColors.black,
),
decoration: const InputDecoration(
hintStyle: TextStyle(color: MyColors.lightTextColor, fontSize: 20),
hintText: "546758594",
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
),
),
),
],
),
),
mExp(1),
],
), ),
40.height, 40.height,
ShowFillButton( ShowFillButton(

@ -20,14 +20,20 @@ class RegisterSelectionPage extends StatelessWidget {
body: Container( body: Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/bn_Intro.png"),
fit: BoxFit.cover,
),
),
child: Column( child: Column(
children: [ children: [
mFlex(4), mFlex(6),
SvgPicture.asset("assets/images/logo.svg"), SvgPicture.asset("assets/images/logo.svg"),
mFlex(3), mFlex(4),
LocaleKeys.welcomeMessage.tr().toText20(), LocaleKeys.welcomeMessage.tr().toText20(),
LocaleKeys.welcomeDes.tr().toText14(color: MyColors.lightTextColor), LocaleKeys.welcomeDes.tr().toText14(color: MyColors.lightTextColor),
mFlex(4), mFlex(1),
ShowFillButton( ShowFillButton(
title: LocaleKeys.login.tr(), title: LocaleKeys.login.tr(),
maxWidth: double.infinity, maxWidth: double.infinity,
@ -57,11 +63,19 @@ class RegisterSelectionPage extends StatelessWidget {
// navigateWithName(context, AppRoutes.forgetPassword); // navigateWithName(context, AppRoutes.forgetPassword);
// }, // },
// ), // ),
mFlex(2), mFlex(3),
SvgPicture.asset( TextButton(
"assets/images/bn_logo.svg", onPressed: () {},
fit: BoxFit.cover, child: const Text(
) "Continue as Guest",
style: TextStyle(
color: MyColors.darkPrimaryColor,
fontWeight: FontWeight.bold,
decoration: TextDecoration.underline,
),
),
),
mFlex(3),
], ],
), ),
), ),

@ -114,6 +114,15 @@ Widget mExp(int f) {
); );
} }
Widget mExpHorizontal(int f) {
return Expanded(
flex: f,
child: Container(
width: double.infinity,
),
);
}
spacer() { spacer() {
return SizedBox( return SizedBox(
height: 8, height: 8,

@ -87,7 +87,7 @@ class _OtpDialogState extends State<OtpDialog> {
}); });
}, },
countDownTimerStyle: TextStyle( countDownTimerStyle: TextStyle(
color: Colors.blue, color: MyColors.darkPrimaryColor,
height: 1.2, height: 1.2,
), ),
), ),
@ -106,10 +106,10 @@ class _OtpDialogState extends State<OtpDialog> {
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child: Text( child: Text(
LocaleKeys.resend_code.tr(), LocaleKeys.resend_code.tr(),
style: TextStyle( style: const TextStyle(
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.blue, color: MyColors.darkPrimaryColor,
), ),
), ),
), ),

@ -18,7 +18,7 @@ class LoginEmailTab extends StatefulWidget {
} }
class _LoginEmailTabState extends State<LoginEmailTab> { class _LoginEmailTabState extends State<LoginEmailTab> {
ClassType type = ClassType.NUMBER; ClassType type = ClassType.EMAIL;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -29,22 +29,22 @@ class _LoginEmailTabState extends State<LoginEmailTab> {
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
type = ClassType.NUMBER; type = ClassType.EMAIL;
widget.onSelection(ClassType.NUMBER); widget.onSelection(ClassType.EMAIL);
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: 45, height: 45,
decoration: BoxDecoration( decoration: BoxDecoration(
color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.grey[200], color: type == ClassType.EMAIL ? MyColors.darkPrimaryColor : Colors.grey[200],
// border: Border.all(color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.transparent, width: 2), // border: Border.all(color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.transparent, width: 2),
borderRadius: BorderRadius.all(Radius.circular(0)), borderRadius: BorderRadius.all(Radius.circular(0)),
), ),
child: Center( child: Center(
child: Text( child: Text(
LocaleKeys.number.tr(), LocaleKeys.email.tr(),
style: TextStyle( style: TextStyle(
color: type == ClassType.NUMBER ? MyColors.white : Colors.black, color: type == ClassType.EMAIL ? MyColors.white : Colors.black,
), ),
), ),
), ),
@ -55,22 +55,22 @@ class _LoginEmailTabState extends State<LoginEmailTab> {
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
type = ClassType.EMAIL; type = ClassType.NUMBER;
widget.onSelection(ClassType.EMAIL); widget.onSelection(ClassType.NUMBER);
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: 45, height: 45,
decoration: BoxDecoration( decoration: BoxDecoration(
color: type == ClassType.EMAIL ? MyColors.darkPrimaryColor : Colors.grey[200], color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.grey[200],
// border: Border.all(color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.transparent, width: 2), // border: Border.all(color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.transparent, width: 2),
borderRadius: BorderRadius.all(Radius.circular(0)), borderRadius: BorderRadius.all(Radius.circular(0)),
), ),
child: Center( child: Center(
child: Text( child: Text(
LocaleKeys.email.tr(), LocaleKeys.phoneNumber.tr(),
style: TextStyle( style: TextStyle(
color: type == ClassType.EMAIL ? MyColors.white : Colors.black, color: type == ClassType.NUMBER ? MyColors.white : Colors.black,
), ),
), ),
), ),

@ -14,7 +14,7 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.8.2" version: "2.9.0"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
@ -28,21 +28,14 @@ packages:
name: characters name: characters
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.1"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
clock: clock:
dependency: transitive dependency: transitive
description: description:
name: clock name: clock
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
collection: collection:
dependency: transitive dependency: transitive
description: description:
@ -98,7 +91,7 @@ packages:
name: fake_async name: fake_async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.3.1"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
@ -321,21 +314,21 @@ packages:
name: matcher name: matcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.11" version: "0.12.12"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.4" version: "0.1.5"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.7.0" version: "1.8.0"
nested: nested:
dependency: transitive dependency: transitive
description: description:
@ -349,7 +342,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.1" version: "1.8.2"
path_drawing: path_drawing:
dependency: transitive dependency: transitive
description: description:
@ -557,7 +550,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.2" version: "1.9.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -585,21 +578,21 @@ packages:
name: string_scanner name: string_scanner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
name: term_glyph name: term_glyph
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.1"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.9" version: "0.4.12"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:

@ -30,6 +30,8 @@
"createPass": "انشاء كلمة مرور جديده *", "createPass": "انشاء كلمة مرور جديده *",
"newPassword": " كلمة مرور جديده", "newPassword": " كلمة مرور جديده",
"forgetPassword": "نسيت كلمة المرور", "forgetPassword": "نسيت كلمة المرور",
"forgetPasswordQ": "نسيت كلمة المرور؟",
"recover": "استعادة",
"forgetPasswordRecover": "نسيت كلمة المرور؟ استعادة", "forgetPasswordRecover": "نسيت كلمة المرور؟ استعادة",
"editAccount": "تعديل الحساب", "editAccount": "تعديل الحساب",
"change": "تغيير", "change": "تغيير",
@ -114,6 +116,7 @@
"userRoleOrTitle": "عنوان المستخدم", "userRoleOrTitle": "عنوان المستخدم",
"codeSentToEmail": "تم ارسال الرمز للايميل", "codeSentToEmail": "تم ارسال الرمز للايميل",
"number": "موبايل", "number": "موبايل",
"phoneNumber": "رقم الهاتف",
"english": "English", "english": "English",
"provider": "Provider", "provider": "Provider",
"title": "Hello", "title": "Hello",

@ -31,6 +31,8 @@
"createPass": "Create Password *", "createPass": "Create Password *",
"newPassword": "New Password", "newPassword": "New Password",
"forgetPassword": "Forget Password", "forgetPassword": "Forget Password",
"forgetPasswordQ": "Forget Password?",
"recover": "Recover",
"forgetPasswordRecover": "Forget Password? Recover", "forgetPasswordRecover": "Forget Password? Recover",
"editAccount": "Edit Account", "editAccount": "Edit Account",
"change": "Change", "change": "Change",
@ -115,6 +117,7 @@
"userRoleOrTitle": "User role or title", "userRoleOrTitle": "User role or title",
"codeSentToEmail": "Code is sent to email", "codeSentToEmail": "Code is sent to email",
"number": "Number", "number": "Number",
"phoneNumber": "Phone Number",
"english": "عربي", "english": "عربي",
"title": "Hello", "title": "Hello",
"msg": "Hello {} in the {} world ", "msg": "Hello {} in the {} world ",

Loading…
Cancel
Save