diff --git a/assets/fonts/Poppins-Medium.ttf b/assets/fonts/Poppins-Medium.ttf
new file mode 100644
index 0000000..6bcdcc2
Binary files /dev/null and b/assets/fonts/Poppins-Medium.ttf differ
diff --git a/assets/icons/Group 17.png b/assets/icons/Group 17.png
new file mode 100644
index 0000000..7bb404a
Binary files /dev/null and b/assets/icons/Group 17.png differ
diff --git a/assets/icons/ic_branchs.svg b/assets/icons/ic_branchs.svg
new file mode 100644
index 0000000..d074656
--- /dev/null
+++ b/assets/icons/ic_branchs.svg
@@ -0,0 +1,27 @@
+
diff --git a/assets/icons/ic_close_account.svg b/assets/icons/ic_close_account.svg
new file mode 100644
index 0000000..93adb61
--- /dev/null
+++ b/assets/icons/ic_close_account.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/icons/ic_face.svg b/assets/icons/ic_face.svg
new file mode 100644
index 0000000..5fa9a9c
--- /dev/null
+++ b/assets/icons/ic_face.svg
@@ -0,0 +1,18 @@
+
diff --git a/assets/icons/ic_fingerprint.svg b/assets/icons/ic_fingerprint.svg
new file mode 100644
index 0000000..ba45417
--- /dev/null
+++ b/assets/icons/ic_fingerprint.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/icons/ic_provider.svg b/assets/icons/ic_provider.svg
new file mode 100644
index 0000000..e22c356
--- /dev/null
+++ b/assets/icons/ic_provider.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/ic_services.svg b/assets/icons/ic_services.svg
new file mode 100644
index 0000000..b0d0606
--- /dev/null
+++ b/assets/icons/ic_services.svg
@@ -0,0 +1,13 @@
+
diff --git a/assets/icons/ic_settings.svg b/assets/icons/ic_settings.svg
new file mode 100644
index 0000000..6435135
--- /dev/null
+++ b/assets/icons/ic_settings.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/ic_sms.svg b/assets/icons/ic_sms.svg
new file mode 100644
index 0000000..132ab7f
--- /dev/null
+++ b/assets/icons/ic_sms.svg
@@ -0,0 +1,13 @@
+
diff --git a/assets/icons/ic_whatsapp.svg b/assets/icons/ic_whatsapp.svg
new file mode 100644
index 0000000..073e581
--- /dev/null
+++ b/assets/icons/ic_whatsapp.svg
@@ -0,0 +1,13 @@
+
diff --git a/assets/images/bn_logo.svg b/assets/images/bn_logo.svg
new file mode 100644
index 0000000..b0c971d
--- /dev/null
+++ b/assets/images/bn_logo.svg
@@ -0,0 +1,560 @@
+
diff --git a/assets/images/ic_email.svg b/assets/images/ic_email.svg
new file mode 100644
index 0000000..81c4573
--- /dev/null
+++ b/assets/images/ic_email.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/images/logo.svg b/assets/images/logo.svg
new file mode 100644
index 0000000..8552147
--- /dev/null
+++ b/assets/images/logo.svg
@@ -0,0 +1,38 @@
+
diff --git a/assets/images/splash_logo.svg b/assets/images/splash_logo.svg
new file mode 100644
index 0000000..481226e
--- /dev/null
+++ b/assets/images/splash_logo.svg
@@ -0,0 +1,16 @@
+
diff --git a/lib/api/shared_prefrence.dart b/lib/api/shared_prefrence.dart
index 2e46e42..30e958e 100644
--- a/lib/api/shared_prefrence.dart
+++ b/lib/api/shared_prefrence.dart
@@ -14,7 +14,7 @@ class SharedPrefManager {
static setUserId(String cookie) async {
final prefs = await SharedPreferences.getInstance();
- prefs.setString(USER_ID, cookie) ?? "NA";
+ prefs.setString(USER_ID, cookie) ;
}
static Future getUserId() async {
@@ -24,7 +24,7 @@ class SharedPrefManager {
static setUserToken(String cookie) async {
final prefs = await SharedPreferences.getInstance();
- prefs.setString(USER_TOKEN, cookie) ?? "NA";
+ prefs.setString(USER_TOKEN, cookie) ;
}
static Future getUserToken() async {
@@ -34,7 +34,7 @@ class SharedPrefManager {
static setPhoneOrEmail(String cookie) async {
final prefs = await SharedPreferences.getInstance();
- prefs.setString(USER_NAME, cookie) ?? "NA";
+ prefs.setString(USER_NAME, cookie) ;
}
static Future getPhoneOrEmail() async {
@@ -44,7 +44,7 @@ class SharedPrefManager {
static setUserPassword(String cookie) async {
final prefs = await SharedPreferences.getInstance();
- prefs.setString(PASSWORD, cookie) ?? "NA";
+ prefs.setString(PASSWORD, cookie) ;
}
static Future getUserPassword() async {
@@ -54,7 +54,7 @@ class SharedPrefManager {
static setRefreshToken(String cookie) async {
final prefs = await SharedPreferences.getInstance();
- prefs.setString(REFRESH_TOKEN, cookie) ?? "NA";
+ prefs.setString(REFRESH_TOKEN, cookie) ;
}
static Future getRefreshToken() async {
@@ -64,7 +64,7 @@ class SharedPrefManager {
static setData(String cookie) async {
final prefs = await SharedPreferences.getInstance();
- prefs.setString(DATA, cookie) ?? "NA";
+ prefs.setString(DATA, cookie);
}
static Future getData() async {
diff --git a/lib/classes/colors.dart b/lib/classes/colors.dart
index 276dc8e..2aaf5d5 100644
--- a/lib/classes/colors.dart
+++ b/lib/classes/colors.dart
@@ -2,14 +2,17 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class MyColors {
- static const Color primaryColor = Colors.white;
- static const Color accentColor = Colors.blue;
+ static const Color darkPrimaryColor = Color(0xffF47F20);
+ static const Color primaryColor = Color(0xffF69521);
+ static const Color accentColor = Colors.blue;
+ static const Color lightTextColor = Color(0xff969696);
+ static const Color textColor = Color(0xff777777);
+ static const Color textFieldColor = Color(0xffF3F5F7);
static const Color darkIconColor = Color(0xff28323A);
static const Color darkTextColor = Color(0xff2B353E);
static const Color normalTextColor = Color(0xff5A5A5A);
- static const Color lightTextColor = Color(0xffBFBFBF);
static const Color gradiantStartColor = Color(0xff33c0a5);
- static const Color gradiantEndColor = Color(0xff259db7 );
+ static const Color gradiantEndColor = Color(0xff259db7);
static const Color textMixColor = Color(0xff2BB8A6);
static const Color backgroundColor = Color(0xffF8F8F8);
static const Color grey57Color = Color(0xff575757);
@@ -28,4 +31,33 @@ class MyColors {
static const Color white = Color(0xffffffff);
static const Color green = Color(0xffffffff);
static const Color borderColor = Color(0xffE8E8E8);
+
+ static Decoration gradient = BoxDecoration(
+ gradient: new LinearGradient(colors: [
+ darkPrimaryColor,
+ primaryColor,
+ ]),
+ boxShadow: [
+ new BoxShadow(
+ color: primaryColor.withOpacity(0.5),
+ blurRadius: 20.0,
+ spreadRadius: 1.0,
+ )
+ ],
+ );
+
+ static Decoration gradientButton = BoxDecoration(
+ gradient: new LinearGradient(colors: [
+ darkPrimaryColor,
+ primaryColor,
+ ]),
+ borderRadius: BorderRadius.circular(6),
+ boxShadow: [
+ new BoxShadow(
+ color: primaryColor.withOpacity(0.2),
+ blurRadius: 4.0,
+ spreadRadius: 0.5,
+ )
+ ],
+ );
}
diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart
index 540315e..d022f00 100644
--- a/lib/classes/consts.dart
+++ b/lib/classes/consts.dart
@@ -1,7 +1,7 @@
class ApiConsts {
// static String baseUrl = "http://10.200.204.20:2801/"; // Local server
- static String baseUrl = "https://mdlaboratories.com"; // production server
- static String baseUrlServices = baseUrl + "/mc/"; // production server
+ static String baseUrl = "https://ms.hmg.com/"; // production server
+ static String baseUrlServices = baseUrl + ""; // production server
static String BasicOTP = baseUrlServices + "api/Register/BasicOTP";
static String BasicVerify = baseUrlServices + "api/Register/BasicVerify";
static String BasicComplete = baseUrlServices + "api/Register/BasicComplete";
diff --git a/lib/classes/utils.dart b/lib/classes/utils.dart
index 9011d5c..3eb5b96 100644
--- a/lib/classes/utils.dart
+++ b/lib/classes/utils.dart
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
// import 'package:fluttertoast/fluttertoast.dart';
import 'package:car_customer_app/exceptions/api_exception.dart';
import 'package:fluttertoast/fluttertoast.dart';
+
class Utils {
static bool _isLoadingVisible = false;
@@ -31,7 +32,7 @@ class Utils {
}
static void showLoading(BuildContext context) {
- WidgetsBinding.instance?.addPostFrameCallback((_) {
+ WidgetsBinding.instance.addPostFrameCallback((_) {
_isLoadingVisible = true;
showDialog(
context: context,
diff --git a/lib/extensions/string_extensions.dart b/lib/extensions/string_extensions.dart
index ae86d77..41274ca 100644
--- a/lib/extensions/string_extensions.dart
+++ b/lib/extensions/string_extensions.dart
@@ -5,10 +5,10 @@ import 'package:car_customer_app/classes/colors.dart';
extension EmailValidator on String {
Widget get toWidget => Text(this);
- Widget toText({Color? color, bool isBold = false,double? fontSize}) => Text(
- this,
- style: TextStyle(fontSize: fontSize??10, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.4),
- );
+ Widget toText({Color? color, bool isBold = false, double? fontSize}) => Text(
+ this,
+ style: TextStyle(fontSize: fontSize ?? 10, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.4),
+ );
Widget toText10({Color? color, bool isBold = false}) => Text(
this,
@@ -42,8 +42,9 @@ extension EmailValidator on String {
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}) => Text(
+ Widget toText14({Color? color, bool isBold = false,TextAlign? textAlign,}) => Text(
this,
+ textAlign: textAlign,
style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 14, letterSpacing: -0.48, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
@@ -57,6 +58,11 @@ extension EmailValidator on String {
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(
+ this,
+ style: TextStyle(height: 23 / 24, color: color ?? MyColors.darkTextColor, fontSize: 20, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
+ );
+
Widget toText22({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(height: 1, color: color ?? MyColors.darkTextColor, fontSize: 22, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
diff --git a/lib/pages/dashboard/dashboard_page.dart b/lib/pages/dashboard/dashboard_page.dart
index 70d0f15..135de02 100644
--- a/lib/pages/dashboard/dashboard_page.dart
+++ b/lib/pages/dashboard/dashboard_page.dart
@@ -13,6 +13,7 @@ import 'package:flutter/material.dart';
import '../../api/client/user_api_client.dart';
import '../../classes/app_state.dart';
+import '../../classes/colors.dart';
import '../../classes/consts.dart';
import 'package:image_picker/image_picker.dart';
import 'dart:io';
@@ -54,9 +55,7 @@ class _DashboardPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(
- title: "Logo/Brand",
- ),
+ appBar: appBar(context, title: "Logo/Brand", isRemoveBackButton: true),
drawer: showDrawer(context),
body: Container(
child: Center(
@@ -75,7 +74,7 @@ class _DashboardPageState extends State {
Container(
width: double.infinity,
height: 200,
- color: accentColor.withOpacity(0.3),
+ color: MyColors.darkPrimaryColor.withOpacity(0.01),
child: Image.network(ApiConsts.baseUrlServices + AppState().getUser.data!.userInfo!.userImageUrl.toString()),
),
Positioned(
@@ -96,7 +95,7 @@ class _DashboardPageState extends State {
),
child: Icon(
Icons.edit,
- color: Colors.blue,
+ color: MyColors.darkPrimaryColor,
).onPress(() {
_openImagePicker();
// _handleURLButtonPress(context, ImageSourceType.camera);
@@ -112,13 +111,12 @@ class _DashboardPageState extends State {
),
child: Icon(
Icons.delete,
- color: Colors.blue,
+ color: Colors.red,
).onPress(() async {
Utils.showLoading(context);
ImageResponse response = await UserApiClent().UpdateUserImage("");
if (response.messageStatus == 1) {
- Utils.showToast( LocaleKeys.imageDeleted.tr());
- //("Image is Deleted");
+ Utils.showToast("Image is Deleted");
setState(() {
AppState().getUser.data!.userInfo!.userImageUrl = response.data;
});
@@ -134,7 +132,7 @@ class _DashboardPageState extends State {
]),
Container(
width: double.infinity,
- color: accentColor.withOpacity(0.1),
+ color: MyColors.darkPrimaryColor.withOpacity(0.1),
padding: EdgeInsets.all(20),
child: Row(
children: [
@@ -143,13 +141,16 @@ class _DashboardPageState extends State {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- userName.toText24(),
- AppState().getUser.data!.userInfo!.roleName!.toText12(),
+ userName.toText20(isBold: true),
+ AppState().getUser.data!.userInfo!.roleName!.toText10(),
],
),
),
ShowFillButton(
- title:LocaleKeys.edit.tr(),
+ title: LocaleKeys.edit.tr(),
+ fontSize: 12,
+ maxHeight: 35,
+ maxWidth: 70,
onPressed: () {
navigateWithName(context, AppRoutes.editAccoundPage);
},
@@ -158,19 +159,33 @@ class _DashboardPageState extends State {
),
),
ListTile(
- leading: Icon(Icons.notifications,color: Colors.blue,),
+ leading: Icon(
+ Icons.notifications,
+ color: MyColors.darkPrimaryColor,
+ ),
title: LocaleKeys.notifications.tr().toText12(),
),
ListTile(
- leading: Icon(Icons.settings,color: Colors.blue,),
+ leading: Icon(
+ Icons.settings,
+ color: MyColors.darkPrimaryColor,
+ ),
title: LocaleKeys.general.tr().toText12(),
),
ListTile(
- leading: Icon(Icons.person,color: Colors.blue,),
+ leading: Icon(
+ Icons.person,
+ color: MyColors.darkPrimaryColor,
+ ),
title: LocaleKeys.account.tr().toText12(),
),
ListTile(
- leading: Image.asset("assets/images/ic_world.png",width: 20,height: 20,color: Colors.blue,),
+ leading: Image.asset(
+ "assets/images/ic_world.png",
+ width: 20,
+ height: 20,
+ color: MyColors.darkPrimaryColor,
+ ),
title: LocaleKeys.english.tr().toText12(),
onTap: () {
if (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA")
@@ -180,11 +195,15 @@ class _DashboardPageState extends State {
},
),
ListTile(
- leading: Icon(Icons.logout,color: Colors.blue,),
+ leading: Icon(
+ Icons.logout,
+ color: MyColors.darkPrimaryColor,
+ ),
title: LocaleKeys.signOut.tr().toText12(),
onTap: () {
pop(context);
pop(context);
+ navigateReplaceWithName(context, AppRoutes.registerSelection);
},
),
],
@@ -219,7 +238,7 @@ class _DashboardPageState extends State {
// double sizeInMb = sizeInBytes / (1024 * 1024);
if (sizeInBytes > 1000) {
Utils.showToast(LocaleKeys.fileLarger.tr());
- //("File is larger then 1KB");
+ //("File is larger then 1KB");
} else {
image64 = convertFileToBase64(pickedImageFile);
@@ -229,7 +248,7 @@ class _DashboardPageState extends State {
Navigator.pop(context);
if (response.messageStatus == 1) {
Utils.showToast(LocaleKeys.imageUploaded.tr());
- //("Image is uploaded");
+ //("Image is uploaded");
AppState().getUser.data!.userInfo!.userImageUrl = response.data;
} else {
Utils.showToast(response.message ?? "");
@@ -251,7 +270,7 @@ class _DashboardPageState extends State {
// double sizeInMb = sizeInBytes / (1024 * 1024);
if (sizeInBytes > 1000) {
Utils.showToast(LocaleKeys.fileLarger.tr());
- //("File is larger then 1KB");
+ //("File is larger then 1KB");
} else {
image64 = convertFileToBase64(pickedImageFile);
@@ -261,7 +280,7 @@ class _DashboardPageState extends State {
Navigator.pop(context);
if (response.messageStatus == 1) {
Utils.showToast(LocaleKeys.imageUploaded.tr());
- //("Image is uploaded");
+ //("Image is uploaded");
AppState().getUser.data!.userInfo!.userImageUrl = response.data;
} else {
Utils.showToast(response.message ?? "");
diff --git a/lib/pages/user/change_email_page.dart b/lib/pages/user/change_email_page.dart
index c5a75f8..46de7ab 100644
--- a/lib/pages/user/change_email_page.dart
+++ b/lib/pages/user/change_email_page.dart
@@ -1,4 +1,3 @@
-
import 'package:car_customer_app/api/client/user_api_client.dart';
import 'package:car_customer_app/classes/utils.dart';
import 'package:car_customer_app/config/routes.dart';
@@ -19,8 +18,9 @@ import 'package:flutter/material.dart';
import 'dart:convert';
import 'package:http/http.dart';
-class ChangeEmailPage extends StatefulWidget {
+import '../../widgets/txt_field.dart';
+class ChangeEmailPage extends StatefulWidget {
@override
State createState() => _ChangeEmailPageState();
}
@@ -32,48 +32,29 @@ class _ChangeEmailPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.changeEmail.tr()),
+ appBar: appBar(context, title: LocaleKeys.changeEmail.tr()),
body: SingleChildScrollView(
child: Container(
// width: double.infinity,
// height: double.infinity,
- padding: EdgeInsets.all(40),
+ padding: EdgeInsets.all(20),
child: Column(
children: [
LocaleKeys.enterEmail.tr().toText24(),
12.height,
- TextFormField(
- decoration: InputDecoration(
- hintText: LocaleKeys.enterNewEmail,
- hintStyle: TextStyle(color: Colors.grey),
- border: OutlineInputBorder(
- borderRadius: const BorderRadius.all(
- const Radius.circular(5.0),
- ),
- ),
- ),
- obscureText: false,
+ TxtField(
+ hint: LocaleKeys.enterNewEmail.tr(),
onChanged: (v) => email = v,
),
12.height,
- TextFormField(
- decoration: InputDecoration(
- hintText: LocaleKeys.enterCurrentPassword.tr(),
- // hintText: "Enter Current Password ",
- hintStyle: TextStyle(color: Colors.grey),
- border: OutlineInputBorder(
- borderRadius: const BorderRadius.all(
- const Radius.circular(5.0),
- ),
- ),
- ),
- obscureText: true,
+ TxtField(
+ hint: LocaleKeys.enterCurrentPassword.tr(),
onChanged: (v) => password = v,
),
40.height,
ShowFillButton(
title: LocaleKeys.confirm.tr(),
- width: double.infinity,
+ maxWidth: double.infinity,
onPressed: () {
changeEmail(context);
},
@@ -116,5 +97,4 @@ class _ChangeEmailPageState extends State {
Utils.showToast(otpRequest.message ?? "");
}
}
-
}
diff --git a/lib/pages/user/change_mobile_page.dart b/lib/pages/user/change_mobile_page.dart
index fcd6cc8..09e2a19 100644
--- a/lib/pages/user/change_mobile_page.dart
+++ b/lib/pages/user/change_mobile_page.dart
@@ -19,6 +19,8 @@ import 'package:flutter/material.dart';
import 'dart:convert';
import 'package:http/http.dart';
+import '../../widgets/txt_field.dart';
+
class ChangeMobilePage extends StatefulWidget {
@override
@@ -33,49 +35,29 @@ class _ChangeMobilePageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.changeMobile.tr(),),
+ appBar: appBar(context, title: LocaleKeys.changeMobile.tr()),
body: SingleChildScrollView(
child: Container(
// width: double.infinity,
// height: double.infinity,
- padding: EdgeInsets.all(40),
+ padding: EdgeInsets.all(20),
child: Column(
children: [
LocaleKeys.enterNewPhoneNumber.tr().toText24(),
12.height,
- TextFormField(
- decoration: InputDecoration(
- //hintText: "Enter New Phone Number",
- hintText: LocaleKeys.enterNewPhoneNumber.tr(),
- hintStyle: TextStyle(color: Colors.grey),
- border: OutlineInputBorder(
- borderRadius: const BorderRadius.all(
- const Radius.circular(5.0),
- ),
- ),
- ),
- obscureText: false,
+ TxtField(
+ hint: LocaleKeys.enterNewPhoneNumber.tr(),
onChanged: (v) => mobileNo = v,
),
12.height,
- TextFormField(
- decoration: InputDecoration(
- hintText: LocaleKeys.enterCurrentPassword.tr(),
- // hintText: "Enter Current Password",
- hintStyle: TextStyle(color: Colors.grey),
- border: OutlineInputBorder(
- borderRadius: const BorderRadius.all(
- const Radius.circular(5.0),
- ),
- ),
- ),
- obscureText: true,
+ TxtField(
+ hint: LocaleKeys.enterCurrentPassword.tr(),
onChanged: (v) => password = v,
),
- 40.height,
+ 20.height,
ShowFillButton(
title: LocaleKeys.confirm.tr(),
- width: double.infinity,
+ maxWidth: double.infinity,
onPressed: () {
changeMobile(context);
},
diff --git a/lib/pages/user/change_password_page.dart b/lib/pages/user/change_password_page.dart
index de4c973..b255e0c 100644
--- a/lib/pages/user/change_password_page.dart
+++ b/lib/pages/user/change_password_page.dart
@@ -36,7 +36,7 @@ class _ChangePasswordPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.changePassword.tr()),
+ appBar: appBar(context, title: LocaleKeys.changePassword.tr()),
body: SingleChildScrollView(
child: Container(
// width: double.infinity,
@@ -46,39 +46,19 @@ class _ChangePasswordPageState extends State {
children: [
LocaleKeys.enterNewPassword.tr().toText24(),
12.height,
- TextFormField(
- decoration: InputDecoration(
- // hintText: "Enter Old Password",
- hintText: LocaleKeys.enterOldPassword.tr(),
- hintStyle: TextStyle(color: Colors.grey),
- border: OutlineInputBorder(
- borderRadius: const BorderRadius.all(
- const Radius.circular(5.0),
- ),
- ),
- ),
- obscureText: true,
+ TxtField(
+ hint: LocaleKeys.enterOldPassword.tr(),
onChanged: (v) => currentPasswor = v,
),
12.height,
- TextFormField(
- decoration: InputDecoration(
- //hintText: "Enter New Password",
- hintText: LocaleKeys.enterNewPassword.tr(),
- hintStyle: TextStyle(color: Colors.grey),
- border: OutlineInputBorder(
- borderRadius: const BorderRadius.all(
- const Radius.circular(5.0),
- ),
- ),
- ),
- obscureText: true,
+ TxtField(
+ hint: LocaleKeys.enterNewPassword.tr(),
onChanged: (v) => newPassword = v,
),
- 40.height,
+ 20.height,
ShowFillButton(
title: LocaleKeys.confirm.tr(),
- width: double.infinity,
+ maxWidth: double.infinity,
onPressed: () {
changePassword(context);
},
@@ -91,22 +71,21 @@ class _ChangePasswordPageState extends State {
}
Future changePassword(BuildContext context) async {
- if (validateStructure(newPassword ?? "")) {
+ if (validateStructure(newPassword)) {
Utils.showLoading(context);
MResponse res = await UserApiClent().ChangePassword(currentPasswor, newPassword);
Utils.hideLoading(context);
if (res.messageStatus == 1) {
Utils.showToast(LocaleKeys.passwordIsUpdated.tr());
- //("Password is Updated");
+ //("Password is Updated");
// navigateWithName(context, AppRoutes.loginWithPassword);
- Navigator.of(context)
- .pushNamedAndRemoveUntil(AppRoutes.loginWithPassword, (Route route) => false);
+ Navigator.of(context).pushNamedAndRemoveUntil(AppRoutes.loginWithPassword, (Route route) => false);
} else {
Utils.showToast(res.message ?? "");
}
} else {
Utils.showToast(LocaleKeys.passwordShouldContains.tr());
- //("Password Should contains Character, Number, Capital and small letters");
+ //("Password Should contains Character, Number, Capital and small letters");
}
}
diff --git a/lib/pages/user/complete_profile_page.dart b/lib/pages/user/complete_profile_page.dart
index 8ba249f..a724ada 100644
--- a/lib/pages/user/complete_profile_page.dart
+++ b/lib/pages/user/complete_profile_page.dart
@@ -20,6 +20,8 @@ import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter_password_strength/flutter_password_strength.dart';
+import '../../classes/colors.dart';
+
class CompleteProfilePage extends StatefulWidget {
RegisterUser user;
@@ -48,7 +50,10 @@ class _CompleteProfilePageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.signUp.tr()),
+ appBar: appBar(
+ context,
+ title: LocaleKeys.signUp.tr(),
+ ),
body: Container(
width: double.infinity,
height: double.infinity,
@@ -57,9 +62,17 @@ class _CompleteProfilePageState extends State {
padding: EdgeInsets.all(20),
child: Column(
children: [
+ 6.height,
LocaleKeys.completeProfile.tr().toText24(),
12.height,
-
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 20),
+ child: LocaleKeys.profileMsg.tr().toText14(
+ color: MyColors.lightTextColor,
+ textAlign: TextAlign.center,
+ ),
+ ),
+ 12.height,
TxtField(
hint: LocaleKeys.firstName.tr(),
value: firstName,
@@ -79,7 +92,7 @@ class _CompleteProfilePageState extends State {
TxtField(
hint: LocaleKeys.email.tr(),
value: email,
- // isButtonEnable: email!.length > 0 ? true : false,
+ // isButtonEnable: email!.length > 0 ? true : false,
buttonTitle: LocaleKeys.verify.tr(),
onChanged: (v) {
email = v;
@@ -91,30 +104,9 @@ class _CompleteProfilePageState extends State {
isPasswordEnabled: true,
maxLines: 1,
value: password,
- isCursorEnd: true,
- onChanged: (value) => _checkPassword(value),
- // onChanged: (v) {
- // password = v;
- // },
- ),
- password!.isNotEmpty ? 12.height : 0.height,
- // The strength indicator bar
- password!.isNotEmpty ? LinearProgressIndicator(
- value: _strength,
- backgroundColor: Colors.grey[300],
- color: _strength <= 1 / 4
- ? Colors.yellow
- : _strength == 2 / 4
- ? Colors.orange
- : _strength == 3 / 4
- ? Colors.deepOrange
- : Colors.red,
- minHeight: 4,
- ): Container(),
- // The message about the strength of the entered password
- Text(
- _displayText,
- style: const TextStyle(fontSize: 12),
+ onChanged: (v) {
+ password = v;
+ },
),
12.height,
TxtField(
@@ -134,17 +126,32 @@ class _CompleteProfilePageState extends State {
Row(
children: [
buildCheckbox(),
- LocaleKeys.termsOfService.tr().toText12(),
+ Expanded(
+ child: Column(
+ children: [
+ LocaleKeys.termsOfService.tr().toText12(),
+ LocaleKeys.terms.tr().toText12(color: MyColors.darkPrimaryColor),
+ ],
+ ),
+ ),
+ Theme(
+ data: ThemeData(unselectedWidgetColor: Colors.transparent),
+ child: Checkbox(
+ value: false,
+ onChanged: (_) {},
+ ),
+ )
],
),
16.height,
ShowFillButton(
- title: LocaleKeys.continu.tr(),
- width: double.infinity,
+ title: LocaleKeys.save.tr(),
+ maxWidth: double.infinity,
onPressed: () {
if (validation()) performCompleteProfile();
},
),
+ 16.height,
],
),
),
@@ -189,11 +196,11 @@ class _CompleteProfilePageState extends State {
// }
Future performCompleteProfile() async {
- if (validateStructure(password ?? "")) {
+ if (validateStructure(password)) {
if (password == confirmPassword) {
print(widget.user.data!.userId?? "userId");
Utils.showLoading(context);
- RegisterUser user = await UserApiClent().basicComplete(widget.user.data!.userId ?? "", firstName!, lastName!, email!, password!);
+ RegisterUser user = await UserApiClent().basicComplete(widget.user.data!.userId ?? "", firstName!, lastName!, email!, password);
Utils.hideLoading(context);
if (user.messageStatus == 1) {
Utils.showToast(LocaleKeys.successfullyRegistered.tr());
@@ -242,7 +249,7 @@ class _CompleteProfilePageState extends State {
//("Enter Valid Email");
isValid = false;
}
- } else if (password!.isEmpty) {
+ } else if (password.isEmpty) {
Utils.showToast(LocaleKeys.passwordNameMandatory.tr());
//("Password is mandatory");
isValid = false;
@@ -261,18 +268,18 @@ class _CompleteProfilePageState extends State {
void _checkPassword(String value) {
password = value.trim();
- if (password!.length <= 6) {
+ if (password.length <= 6) {
setState(() {
_strength = 1 / 4;
_displayText = 'Your password is too short';
});
- } else if (password!.length < 8) {
+ } else if (password.length < 8) {
setState(() {
_strength = 2 / 4;
_displayText = 'Your password is acceptable but not strong';
});
} else {
- if (!letterReg.hasMatch(password!) || !numReg.hasMatch(password!)) {
+ if (!letterReg.hasMatch(password) || !numReg.hasMatch(password)) {
setState(() {
_strength = 3 / 4;
_displayText = 'Your password is strong';
diff --git a/lib/pages/user/confirm_new_password.dart b/lib/pages/user/confirm_new_password.dart
index fc3fd1d..dcadd20 100644
--- a/lib/pages/user/confirm_new_password.dart
+++ b/lib/pages/user/confirm_new_password.dart
@@ -31,7 +31,7 @@ class ConfirmNewPasswordPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.forgetPassword.tr()),
+ appBar: appBar(context,title: LocaleKeys.forgetPassword.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
@@ -51,7 +51,7 @@ class ConfirmNewPasswordPage extends StatelessWidget {
40.height,
ShowFillButton(
title: LocaleKeys.confirm.tr(),
- width: double.infinity,
+ maxWidth: double.infinity,
onPressed: () {
confirmPasswordOTP(context);
},
diff --git a/lib/pages/user/confirm_new_password_page.dart b/lib/pages/user/confirm_new_password_page.dart
index 4628871..5750b23 100644
--- a/lib/pages/user/confirm_new_password_page.dart
+++ b/lib/pages/user/confirm_new_password_page.dart
@@ -35,7 +35,7 @@ class _ConfirmNewPasswordPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.forgetPassword.tr()),
+ appBar: appBar(context,title: LocaleKeys.forgetPassword.tr()),
body: SingleChildScrollView(
child: Container(
// width: double.infinity,
@@ -77,7 +77,7 @@ class _ConfirmNewPasswordPageState extends State {
40.height,
ShowFillButton(
title: LocaleKeys.confirm.tr(),
- width: double.infinity,
+ maxWidth: double.infinity,
onPressed: () {
if (validation()) confirmPasswordOTP(context);
},
@@ -90,7 +90,7 @@ class _ConfirmNewPasswordPageState extends State {
}
Future confirmPasswordOTP(BuildContext context) async {
- if(validateStructure(newPassword??"")){
+ if(validateStructure(newPassword)){
Utils.showLoading(context);
Response res = await UserApiClent().ForgetPassword(widget.userToken, newPassword);
Utils.hideLoading(context);
diff --git a/lib/pages/user/edit_account_page.dart b/lib/pages/user/edit_account_page.dart
index 87fc693..a64cc73 100644
--- a/lib/pages/user/edit_account_page.dart
+++ b/lib/pages/user/edit_account_page.dart
@@ -19,6 +19,8 @@ import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
+import '../../classes/colors.dart';
+
class EditAccountPage extends StatefulWidget {
@override
State createState() => _EditAccountPageState();
@@ -31,61 +33,94 @@ class _EditAccountPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.editAccount.tr(),),
+ appBar: appBar(context, title: LocaleKeys.editAccount.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
- padding: EdgeInsets.all(40),
+ padding: EdgeInsets.all(20),
child: Column(
children: [
20.height,
- ListTile(
- leading: SvgPicture.asset("assets/images/ic_lock.svg"),
- title: LocaleKeys.changePassword.tr().toText12(),
- onTap: () {
- navigateWithName(context, AppRoutes.changePassword);
- },
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ SvgPicture.asset(
+ "assets/images/ic_lock.svg",
+ color: MyColors.darkPrimaryColor,
+ width: 16,
+ ),
+ 20.width,
+ Expanded(child: LocaleKeys.changePassword.tr().toText12(isBold: true)),
+ RaisedButton(
+ onPressed: () {
+ navigateWithName(context, AppRoutes.changePassword);
+ },
+ child: Text(
+ LocaleKeys.change.tr(),
+ style: TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ color: MyColors.darkPrimaryColor,
+ textColor: Colors.white,
+ padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8),
+ ),
+ ],
),
15.height,
Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.start,
children: [
- SvgPicture.asset("assets/images/ic_mobile.svg"),
- LocaleKeys.changeMobile.tr().toText12(),
- LocaleKeys.verify.tr().toText12(),
+ SvgPicture.asset(
+ "assets/images/ic_mobile.svg",
+ color: MyColors.darkPrimaryColor,
+ width: 16,
+ ),
+ 20.width,
+ Expanded(child: LocaleKeys.changeMobile.tr().toText12(isBold: true)),
+ LocaleKeys.verify.tr().toText12(color: Colors.green),
+ 20.width,
RaisedButton(
- onPressed: () {
- navigateWithName(context, AppRoutes.changeMobilePage);
- },
- child: Text(
- LocaleKeys.change.tr(),
- style: TextStyle(
- fontSize: 14,
- fontWeight: FontWeight.w600,
- ),
+ onPressed: () {
+ navigateWithName(context, AppRoutes.changeMobilePage);
+ },
+ child: Text(
+ LocaleKeys.change.tr(),
+ style: TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
),
- color: Colors.blue,
- textColor: Colors.white,
- padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8))
+ ),
+ textColor: Colors.white,
+ color: MyColors.darkPrimaryColor,
+ padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8),
+ )
],
),
20.height,
Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.start,
children: [
- Icon(
- Icons.email,
- color: Colors.blue,
+ SvgPicture.asset(
+ "assets/images/ic_email.svg",
+ color: MyColors.darkPrimaryColor,
+ width: 16,
),
- LocaleKeys.changeEmail.tr().toText12(),
+ 20.width,
+ Expanded(child: LocaleKeys.changeEmail.tr().toText12(isBold: true)),
InkWell(
- child: ((AppState().getUser.data!.userInfo!.isEmailVerified ?? false) ? LocaleKeys.verified.tr() : LocaleKeys.verify.tr()).toText12(),
+ child: ((AppState().getUser.data!.userInfo!.isEmailVerified ?? false) ? LocaleKeys.verified.tr() : LocaleKeys.verify.tr()).toText12(color: Colors.green),
onTap: (AppState().getUser.data!.userInfo!.isEmailVerified ?? false)
? null
: () {
verifyEmail(context);
},
),
+ 20.width,
RaisedButton(
onPressed: () {
navigateWithName(context, AppRoutes.changeEmailPage);
@@ -97,8 +132,8 @@ class _EditAccountPageState extends State {
fontWeight: FontWeight.w600,
),
),
- color: Colors.blue,
textColor: Colors.white,
+ color: MyColors.darkPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8))
],
)
@@ -138,7 +173,7 @@ class _EditAccountPageState extends State {
AppState().getUser.data!.userInfo!.isEmailVerified = true;
setState(() {});
Utils.showToast(LocaleKeys.emailVerified.tr());
- //("Email is verified successfully");
+ //("Email is verified successfully");
// Navigator.of(context).pushNamedAndRemoveUntil(AppRoutes.dashboard, (Route route) => false);
// showMDialog(
// context,
diff --git a/lib/pages/user/forget_password_method_page.dart b/lib/pages/user/forget_password_method_page.dart
index 10bc39b..2b8bd11 100644
--- a/lib/pages/user/forget_password_method_page.dart
+++ b/lib/pages/user/forget_password_method_page.dart
@@ -36,7 +36,7 @@ class _ForgetPasswordMethodPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.forgetPassword.tr()),
+ appBar: appBar(context, title: LocaleKeys.forgetPassword.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
@@ -54,7 +54,7 @@ class _ForgetPasswordMethodPageState extends State {
forgetPasswordOTPMethod(context);
},
title: LocaleKeys.SMS.tr(),
- icon: icons + "ic_sms.png",
+ icon: icons + "ic_sms.svg",
),
),
20.width,
@@ -65,7 +65,7 @@ class _ForgetPasswordMethodPageState extends State {
forgetPasswordOTPMethod(context);
},
title: LocaleKeys.whatsapp.tr(),
- icon: icons + "ic_whatsapp.png",
+ icon: icons + "ic_whatsapp.svg",
),
),
],
@@ -82,7 +82,7 @@ class _ForgetPasswordMethodPageState extends State {
onClick: (String code) async {
pop(context);
Utils.showLoading(context);
- Response res = await UserApiClent().ForgetPasswordOTPCompare(widget.userToken?? "", code);
+ Response res = await UserApiClent().ForgetPasswordOTPCompare(widget.userToken, code);
Utils.hideLoading(context);
PasswordOTPCompare otpCompare = PasswordOTPCompare.fromJson(jsonDecode(res.body));
if (otpCompare.messageStatus == 1) {
diff --git a/lib/pages/user/forget_password_page.dart b/lib/pages/user/forget_password_page.dart
index 1f80845..d5ddf79 100644
--- a/lib/pages/user/forget_password_page.dart
+++ b/lib/pages/user/forget_password_page.dart
@@ -27,6 +27,7 @@ import 'package:car_customer_app/models/user/user.dart';
import 'dart:convert';
import 'package:http/http.dart';
+import '../../classes/colors.dart';
import '../../models/user/country.dart';
import '../../widgets/dropdown/dropdow_field.dart';
import '../../widgets/tab/login_email_tab.dart';
@@ -59,56 +60,74 @@ class _ForgetPasswordPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.changePassword.tr()),
+ appBar: appBar(context,title: LocaleKeys.changePassword.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
- padding: EdgeInsets.all(40),
- child: Column(
- children: [
- mFlex(1),
- LoginEmailTab(
- onSelection: (ClassType type) {
- setState(() {
- this.type = type;
- });
- },
+ padding: EdgeInsets.all(20),
+ child: SingleChildScrollView(
+ child: Container(
+ height: MediaQuery.of(context).size.height,
+ child: Column(
+ children: [
+ 12.height,
+ LocaleKeys.forgetPassword.tr().toText20(),
+ 20.height,
+ LocaleKeys.retrievePassword.tr().toText14(
+ color: MyColors.lightTextColor,
+ textAlign: TextAlign.center,
+ ),
+ 30.height,
+ LoginEmailTab(
+ onSelection: (ClassType type) {
+ setState(() {
+ this.type = type;
+ });
+ },
+ ),
+ 12.height,
+ type == ClassType.NUMBER
+ ? Column(
+ children: [
+ getCountry(),
+ 6.height,
+ TxtField(
+ hint: "5********",
+ value: userName,
+ onChanged: (v) {
+ userName = v;
+ },
+ )
+ ],
+ )
+ : TxtField(
+ hint: LocaleKeys.emailAddress.tr(),
+ value: userName,
+ onChanged: (v) {
+ userName = v;
+ },
+ ),
+ 20.height,
+ (type == ClassType.NUMBER ? LocaleKeys.retriveOnPhone.tr() : LocaleKeys.retriveOnEmail.tr()).toText14(
+ color: MyColors.lightTextColor,
+ textAlign: TextAlign.center,
+ ),
+ 30.height,
+ ShowFillButton(
+ title: LocaleKeys.send.tr(),
+ maxWidth: double.infinity,
+ onPressed: () {
+ if (userName.isNum() && type == ClassType.NUMBER) {
+ forgetPasswordPhoneOTP(context);
+ } else if (!userName.isNum() && type == ClassType.EMAIL) {
+ forgetPasswordEmailOTP(context);
+ }
+ },
+ ),
+ mFlex(10),
+ ],
),
- 50.height,
- LocaleKeys.retrievePassword.tr().toText24(),
- 12.height,
- type == ClassType.NUMBER ? Column(children: [
- getCountry(),
- TxtField(
- hint: "5********",
- value: userName,
- onChanged: (v) {
- userName = v;
- },
- keyboardType: TextInputType.number,
- )
- ],) : TxtField(
- hint: LocaleKeys.emailAddress.tr(),
- //"Email Address",
- value: userName,
- onChanged: (v) {
- userName = v;
- },
- ),
- 50.height,
- ShowFillButton(
- title: LocaleKeys.continu.tr(),
- width: double.infinity,
- onPressed: () {
- if (userName.isNum() && type==ClassType.NUMBER) {
- forgetPasswordPhoneOTP(context);
- } else if (userName.isValidEmail() && type==ClassType.EMAIL) {
- forgetPasswordEmailOTP(context);
- }
- },
- ),
- mFlex(10),
- ],
+ ),
),
),
);
diff --git a/lib/pages/user/login_method_selection_page.dart b/lib/pages/user/login_method_selection_page.dart
index b84804b..3a96350 100644
--- a/lib/pages/user/login_method_selection_page.dart
+++ b/lib/pages/user/login_method_selection_page.dart
@@ -33,65 +33,68 @@ class LoginMethodSelectionPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.login.tr()),
+ appBar: appBar(context, title: LocaleKeys.log_in.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
- padding: EdgeInsets.all(40),
- child: Column(
- children: [
- LocaleKeys.loginSelection.tr().toText24(),
- mFlex(2),
- Row(
- children: [
- Expanded(
- child: ShowImageButton(
- onClick: () {
- performBasicOtp(context);
- },
- title: LocaleKeys.fingerPrint.tr(),
- icon: icons + "ic_fingerprint.png",
+ padding: EdgeInsets.all(20),
+ child: SingleChildScrollView(
+ child: Column(
+ children: [
+ LocaleKeys.loginSelection.tr().toText20(),
+ 30.height,
+ LocaleKeys.welcomeBack.tr().toText20(),
+ 40.height,
+ Row(
+ children: [
+ Expanded(
+ child: ShowImageButton(
+ onClick: () {
+ performBasicOtp(context);
+ },
+ title: LocaleKeys.fingerPrint.tr(),
+ icon: icons + "ic_fingerprint.svg",
+ ),
),
- ),
- 20.width,
- Expanded(
- child: ShowImageButton(
- onClick: () {
- performBasicOtp(context);
- },
- title: LocaleKeys.faceRecognition.tr(),
- icon: icons + "ic_face_id.png",
+ 20.width,
+ Expanded(
+ child: ShowImageButton(
+ onClick: () {
+ performBasicOtp(context);
+ },
+ title: LocaleKeys.faceRecognition.tr(),
+ icon: icons + "ic_face.svg",
+ ),
),
- ),
- ],
- ),
- 40.height,
- Row(
- children: [
- Expanded(
- child: ShowImageButton(
- onClick: () {
- performBasicOtp(context);
- },
- title: LocaleKeys.SMS.tr(),
- icon: icons + "ic_sms.png",
+ ],
+ ),
+ 40.height,
+ Row(
+ children: [
+ Expanded(
+ child: ShowImageButton(
+ onClick: () {
+ performBasicOtp(context);
+ },
+ title: LocaleKeys.SMS.tr(),
+ icon: icons + "ic_sms.svg",
+ ),
),
- ),
- 20.width,
- Expanded(
- child: ShowImageButton(
- onClick: () {
- // navigateWithName(context, AppRoutes.dashboard);
- performBasicOtp(context);
- },
- title: LocaleKeys.whatsapp.tr(),
- icon: icons + "ic_whatsapp.png",
+ 20.width,
+ Expanded(
+ child: ShowImageButton(
+ onClick: () {
+ // navigateWithName(context, AppRoutes.dashboard);
+ performBasicOtp(context);
+ },
+ title: LocaleKeys.whatsapp.tr(),
+ icon: icons + "ic_whatsapp.svg",
+ ),
),
- ),
- ],
- ),
- mFlex(10),
- ],
+ ],
+ ),
+ ],
+ ),
),
),
);
diff --git a/lib/pages/user/login_verification_page.dart b/lib/pages/user/login_verification_page.dart
index 5232b77..717d128 100644
--- a/lib/pages/user/login_verification_page.dart
+++ b/lib/pages/user/login_verification_page.dart
@@ -88,7 +88,7 @@ class _LoginVerificationPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.login.tr()),
+ appBar: appBar(context,title: LocaleKeys.login.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
diff --git a/lib/pages/user/login_verify_account_page.dart b/lib/pages/user/login_verify_account_page.dart
index ec0275a..7115f71 100644
--- a/lib/pages/user/login_verify_account_page.dart
+++ b/lib/pages/user/login_verify_account_page.dart
@@ -26,7 +26,7 @@ class LoginVerifyAccountPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.login.tr()),
+ appBar: appBar(context,title: LocaleKeys.login.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
diff --git a/lib/pages/user/login_with_password_page.dart b/lib/pages/user/login_with_password_page.dart
index 6bfebcc..e42d712 100644
--- a/lib/pages/user/login_with_password_page.dart
+++ b/lib/pages/user/login_with_password_page.dart
@@ -26,6 +26,7 @@ import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
+import '../../classes/colors.dart';
import '../../models/user/country.dart';
import '../../widgets/dropdown/dropdow_field.dart';
@@ -57,83 +58,91 @@ class _LoginWithPasswordState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.login.tr()),
+ appBar: appBar(context, title: ""),
body: Container(
width: double.infinity,
height: double.infinity,
- padding: EdgeInsets.all(40),
- child: Column(
- children: [
- LoginEmailTab(
- onSelection: (ClassType type) {
- setState(() {
- this.type = type;
- });
- },
- ),
- 50.height,
- (type == ClassType.NUMBER ? LocaleKeys.enterPhoneNumber.tr() : LocaleKeys.enterEmail.tr()).toText24(),
- mFlex(1),
- Column(
- children: [
- if (type == ClassType.NUMBER)
- getCountry(),
- 6.height,
- TxtField(
- hint: type == ClassType.NUMBER ? "5********" : LocaleKeys.enterEmail.tr(),
- value: phoneNum,
- onChanged: (v) {
- phoneNum = v;
- },
- ),
- 6.height,
- TxtField(
- hint: LocaleKeys.EnterPass.tr(),
- value: password,
- isPasswordEnabled: true,
- maxLines: 1,
- onChanged: (v) {
- password = v;
- },
- ),
- ],
- ),
- 10.height,
- Row(
- mainAxisAlignment: MainAxisAlignment.end,
- children: [
- LocaleKeys.forgetPass.tr().toText12(color: Colors.blue).onPress(() {
+ padding: EdgeInsets.all(20),
+ child: SingleChildScrollView(
+ child: Column(
+ children: [
+ 12.height,
+ LocaleKeys.log_in.tr().toText20(),
+ 20.height,
+ (type == ClassType.NUMBER ? LocaleKeys.enterPhoneNumber.tr() : LocaleKeys.enterEmail.tr()).toText14(
+ color: MyColors.lightTextColor,
+ textAlign: TextAlign.center,
+ ),
+ 30.height,
+ LoginEmailTab(
+ onSelection: (ClassType type) {
+ setState(() {
+ this.type = type;
+ });
+ },
+ ),
+ 10.height,
+ Column(
+ children: [
+ if (type == ClassType.NUMBER) getCountry(context),
+ 10.height,
+ TxtField(
+ hint: type == ClassType.NUMBER ? LocaleKeys.enterPhoneNumber.tr() : LocaleKeys.enterEmail.tr(),
+ value: phoneNum,
+ isSidePaddingZero: true,
+ onChanged: (v) {
+ phoneNum = v;
+ },
+ ),
+ 10.height,
+ TxtField(
+ hint: LocaleKeys.EnterPass.tr(),
+ value: password,
+ isPasswordEnabled: true,
+ isSidePaddingZero: true,
+ maxLines: 1,
+ onChanged: (v) {
+ password = v;
+ },
+ ),
+ ],
+ ),
+ 10.height,
+ ShowFillButton(
+ title: LocaleKeys.forgetPassword.tr(),
+ isFlatButton: true,
+ isBold: false,
+ fontSize: 14,
+ txtColor: MyColors.darkPrimaryColor,
+ onPressed: () {
navigateWithName(context, AppRoutes.forgetPassword);
- }),
- ],
- ),
- 50.height,
- ShowFillButton(
- title: LocaleKeys.login.tr(),
- width: double.infinity,
- onPressed: () {
- performBasicOtp(context);
- },
- ),
- mFlex(10),
- ],
+ },
+ ),
+ 30.height,
+ ShowFillButton(
+ title: LocaleKeys.login.tr(),
+ maxWidth: double.infinity,
+ onPressed: () {
+ performBasicOtp(context);
+ },
+ ),
+ 20.height,
+ ],
+ ),
),
),
);
}
- Widget getCountry() {
+ Widget getCountry(BuildContext context) {
if (_country != null) {
List dropList = [];
_country!.data?.forEach((element) {
dropList.add(new DropValue(element.id ?? 0, (element.countryName ?? "") + " " + (element.countryCode ?? ""), element.countryCode ?? ""));
});
- return Padding(
- padding: const EdgeInsets.all(2.0),
- child: DropdownField((DropValue value) {
- countryCode = value.subValue;
- }, list: dropList, hint: LocaleKeys.selectCountryCode.tr()),
- );
+ return DropdownField((DropValue value) {
+ countryCode = value.subValue;
+ }, list: dropList, hint: LocaleKeys.selectCountryCode.tr());
} else {
return Center(
child: CircularProgressIndicator(),
diff --git a/lib/pages/user/register_page.dart b/lib/pages/user/register_page.dart
index 9062519..a0e94fe 100644
--- a/lib/pages/user/register_page.dart
+++ b/lib/pages/user/register_page.dart
@@ -19,9 +19,12 @@ import 'package:car_customer_app/extensions/int_extensions.dart';
import 'package:car_customer_app/extensions/string_extensions.dart';
import 'package:car_customer_app/extensions/widget_extensions.dart';
import 'package:car_customer_app/widgets/txt_field.dart';
+import 'package:easy_localization/easy_localization.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
+import '../../classes/colors.dart';
+
class RegisterPage extends StatelessWidget {
String phoneNum = "", countryCode = "";
int role = 4, countryId = -1;
@@ -29,64 +32,79 @@ class RegisterPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.signUp.tr(),),
+ appBar: appBar(context, title: ""),
body: Container(
width: double.infinity,
height: double.infinity,
- padding: EdgeInsets.all(40),
- child: Column(
- children: [
- LocaleKeys.enterPhoneNumber.tr().toText24(),
- // 12.height,
- // FutureBuilder(
- // future: UserApiClent().getRoles(),
- // builder: (context, snapshot) {
- // if (snapshot.hasData) {
- // List dropList = [];
- // snapshot.data?.data?.forEach((element) {
- // dropList.add(new DropValue(element.id ?? 0, element.roleName ?? "", ""));
- // });
- // return DropdownField((DropValue value) {
- // role = value.id;
- // }, list: dropList, hint: "Chosse Role");
- // } else {
- // return CircularProgressIndicator();
- // }
- // },
- // ),
- 12.height,
- FutureBuilder(
- future: UserApiClent().getAllCountries(),
- builder: (context, snapshot) {
- if (snapshot.hasData) {
- List dropList = [];
- snapshot.data?.data?.forEach((element) {
- dropList.add(new DropValue(element.id ?? 0, (element.countryName ?? "") + " " + (element.countryCode ?? ""), element.countryCode ?? ""));
- });
- return DropdownField((DropValue value) {
- countryCode = value.subValue;
- countryId = value.id;
- }, list: dropList, hint: LocaleKeys.selectCountryCode.tr());
- } else {
- return CircularProgressIndicator();
- }
- },
- ),
- TxtField(
- hint: "5********",
- onChanged: (v) {
- phoneNum = v;
- },
- ),
- 50.height,
- ShowFillButton(
- title: LocaleKeys.continu.tr(),
- width: double.infinity,
- onPressed: () {
- if (validation()) performBasicOtp(context);
- },
+ padding: EdgeInsets.all(20),
+ child: SingleChildScrollView(
+ child: Container(
+ height: MediaQuery.of(context).size.height,
+ child: Column(
+ children: [
+ 12.height,
+ LocaleKeys.signUp.tr().toText20(),
+ 20.height,
+ LocaleKeys.enterPhoneNumber.tr().toText14(
+ color: MyColors.lightTextColor,
+ textAlign: TextAlign.center,
+ ),
+ 30.height,
+ FutureBuilder(
+ future: UserApiClent().getAllCountries(),
+ builder: (context, snapshot) {
+ if (snapshot.hasData) {
+ List dropList = [];
+ snapshot.data?.data?.forEach((element) {
+ dropList.add(new DropValue(
+ element.id ?? 0,
+ EasyLocalization.of(context)?.currentLocale?.countryCode == "SA"
+ ? (element.countryNameN ?? "") + " " + (element.countryCode ?? "")
+ : (element.countryName ?? "") + " " + (element.countryCode ?? ""),
+ element.countryCode ?? ""));
+ });
+ return Column(
+ children: [
+ LocaleKeys.selectYourCountry.tr().toText14(
+ color: MyColors.lightTextColor,
+ textAlign: TextAlign.center,
+ ),
+ 10.height,
+ DropdownField((DropValue value) {
+ countryCode = value.subValue;
+ countryId = value.id;
+ }, list: dropList, hint: LocaleKeys.chooseCountry.tr()),
+ ],
+ );
+ } else {
+ return CircularProgressIndicator();
+ }
+ },
+ ),
+ 18.height,
+ LocaleKeys.enterPhoneForVerfication.tr().toText14(
+ color: MyColors.lightTextColor,
+ textAlign: TextAlign.center,
+ ),
+ 10.height,
+ TxtField(
+ hint: "5********",
+ value: phoneNum,
+ onChanged: (v) {
+ phoneNum = v;
+ },
+ ),
+ 40.height,
+ ShowFillButton(
+ title: LocaleKeys.continu.tr(),
+ maxWidth: double.infinity,
+ onPressed: () {
+ if (validation()) performBasicOtp(context);
+ },
+ ),
+ ],
),
- ],
+ ),
),
),
);
diff --git a/lib/pages/user/register_selection_page.dart b/lib/pages/user/register_selection_page.dart
index afbd7e7..646ea0f 100644
--- a/lib/pages/user/register_selection_page.dart
+++ b/lib/pages/user/register_selection_page.dart
@@ -9,53 +9,61 @@ import 'package:car_customer_app/extensions/int_extensions.dart';
import 'package:car_customer_app/extensions/widget_extensions.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+
+import '../../classes/colors.dart';
class RegisterSelectionPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.login.tr()),
+ // appBar: appBar(title: LocaleKeys.login.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
- padding: EdgeInsets.all(40),
child: Column(
children: [
- LocaleKeys.welcomeMessage.tr().toText24(),
- mFlex(1),
+ mFlex(2),
+ SvgPicture.asset("assets/images/logo.svg"),
+ mFlex(3),
+ LocaleKeys.welcomeMessage.tr().toText20(),
+ LocaleKeys.welcomeDes.tr().toText14(color: MyColors.lightTextColor),
+ mFlex(4),
ShowFillButton(
title: LocaleKeys.login.tr(),
// title: "Log In With Password",
- width: double.infinity,
+ maxWidth: double.infinity,
+ horizontalMargin: 20,
onPressed: () {
navigateWithName(context, AppRoutes.loginWithPassword);
},
),
- // 20.height,
- // ShowFillButton(
- // title: "Log In",
- // width: double.infinity,
- // onPressed: () {
- // navigateWithName(context, AppRoutes.loginVerifyAccount);
- // },
- // ),
20.height,
ShowFillButton(
title: LocaleKeys.signUp.tr(),
- width: double.infinity,
+ maxWidth: double.infinity,
+ isFlatButton: true,
+ txtColor: Colors.black,
onPressed: () {
navigateWithName(context, AppRoutes.register);
},
),
- 20.height,
+ 10.height,
ShowFillButton(
title: LocaleKeys.forgetPassword.tr(),
- width: double.infinity,
+ maxWidth: double.infinity,
+ isFlatButton: true,
+ isBold: false,
+ txtColor: MyColors.darkPrimaryColor,
onPressed: () {
navigateWithName(context, AppRoutes.forgetPassword);
},
),
mFlex(2),
+ SvgPicture.asset(
+ "assets/images/bn_logo.svg",
+ fit: BoxFit.cover,
+ )
],
),
),
diff --git a/lib/pages/user/splash_page.dart b/lib/pages/user/splash_page.dart
index e06133b..602a99d 100644
--- a/lib/pages/user/splash_page.dart
+++ b/lib/pages/user/splash_page.dart
@@ -1,91 +1,107 @@
-import 'dart:async';
-import 'dart:convert';
-
-import 'package:car_customer_app/api/client/user_api_client.dart';
-import 'package:car_customer_app/api/shared_prefrence.dart';
-import 'package:car_customer_app/classes/utils.dart';
import 'package:car_customer_app/config/routes.dart';
-import 'package:car_customer_app/extensions/int_extensions.dart';
-import 'package:car_customer_app/extensions/string_extensions.dart';
-import 'package:car_customer_app/generated/locale_keys.g.dart';
-import 'package:car_customer_app/models/user/user.dart';
+
import 'package:car_customer_app/utils/navigator.dart';
import 'package:car_customer_app/utils/utils.dart';
-import 'package:car_customer_app/extensions/widget_extensions.dart';
-import 'package:car_customer_app/widgets/show_fill_button.dart';
-import 'package:easy_localization/easy_localization.dart';
-import 'package:easy_localization/src/public_ext.dart';
+import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter/material.dart';
-import '../../classes/app_state.dart';
-import '../../models/user/refresh_token.dart';
+import '../../classes/colors.dart';
+
+// class SplashPage extends StatelessWidget {
+// @override
+// Widget build(BuildContext context) {
+// return Scaffold(
+// body: Container(
+// width: double.infinity,
+// height: double.infinity,
+// child: Column(
+// children: [
+// mFlex(5),
+// "Logo".toText(fontSize: 45, isBold: true),
+// mFlex(3),
+// LocaleKeys.firstTimeLogIn.tr().toText(fontSize: 18, isBold: true).onPress(() {
+// navigateWithName(context, AppRoutes.registerSelection);
+// }),
+// mFlex(1),
+// LocaleKeys.alreadySigned.tr().toText(fontSize: 18, isBold: true).onPress(() async {
+// // navigateWithName(context, AppRoutes.loginVerification);
+//
+// String token = await SharedPrefManager.getUserToken();
+// String refreshToken = await SharedPrefManager.getRefreshToken();
+// Utils.showLoading(context);
+// RefreshToken refresh = await UserApiClent().RefreshTokenAPI(token, refreshToken);
+// Utils.hideLoading(context);
+// if (refresh.messageStatus == 1) {
+// SharedPrefManager.setUserToken(refresh.data!.accessToken ?? "");
+// SharedPrefManager.setRefreshToken(refresh.data!.refreshToken ?? "");
+// String mdata = await SharedPrefManager.getData();
+// print(mdata);
+// UserInfo info = UserInfo.fromJson(jsonDecode(mdata));
+// User user = new User();
+// user.data = new UserData(accessToken: refresh.data!.accessToken ?? "", refreshToken: refresh.data!.refreshToken ?? "", userInfo: info);
+// AppState().setUser = user;
+// print(AppState().getUser.data?.userInfo?.roleName);
+// navigateWithName(context, AppRoutes.dashboard);
+// } else {
+// String accessToken = await SharedPrefManager.getUserToken();
+// String refreshToken = await SharedPrefManager.getRefreshToken();
+// String mdata = await SharedPrefManager.getData();
+// UserInfo info = UserInfo.fromJson(jsonDecode(mdata));
+// User user = new User();
+// user.data = new UserData(accessToken: accessToken, refreshToken: refreshToken, userInfo: info);
+// AppState().setUser = user;
+// print(AppState().getUser.data?.userInfo?.roleName);
+// navigateWithName(context, AppRoutes.dashboard);
+// }
+// }),
+// 35.height,
+// TextButton(
+// style: TextButton.styleFrom(
+// backgroundColor: Colors.white,
+// ),
+// onPressed: () {
+// if (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA")
+// context.setLocale(const Locale("en", "US"));
+// else
+// context.setLocale(const Locale('ar', 'SA'));
+// },
+// child: Text(
+// LocaleKeys.english.tr(),
+// ),
+// ),
+// mFlex(5),
+// ],
+// ),
+// ),
+// );
+// }
+// }
class SplashPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ performTimer(context);
return Scaffold(
body: Container(
width: double.infinity,
height: double.infinity,
+ decoration: MyColors.gradient,
child: Column(
children: [
- mFlex(5),
- "Logo".toText(fontSize: 45, isBold: true),
- mFlex(3),
- LocaleKeys.firstTimeLogIn.tr().toText(fontSize: 18, isBold: true).onPress(() {
- navigateWithName(context, AppRoutes.registerSelection);
- }),
- mFlex(1),
- LocaleKeys.alreadySigned.tr().toText(fontSize: 18, isBold: true).onPress(() async {
- // navigateWithName(context, AppRoutes.loginVerification);
-
- String token = await SharedPrefManager.getUserToken();
- String refreshToken = await SharedPrefManager.getRefreshToken();
- Utils.showLoading(context);
- RefreshToken refresh = await UserApiClent().RefreshTokenAPI(token, refreshToken);
- Utils.hideLoading(context);
- if (refresh.messageStatus == 1) {
- SharedPrefManager.setUserToken(refresh.data!.accessToken ?? "");
- SharedPrefManager.setRefreshToken(refresh.data!.refreshToken ?? "");
- String mdata = await SharedPrefManager.getData();
- print(mdata);
- UserInfo info = UserInfo.fromJson(jsonDecode(mdata));
- User user = new User();
- user.data = new UserData(accessToken: refresh.data!.accessToken ?? "", refreshToken: refresh.data!.refreshToken ?? "", userInfo: info);
- AppState().setUser = user;
- print(AppState().getUser.data?.userInfo?.roleName);
- navigateWithName(context, AppRoutes.dashboard);
- } else {
- String accessToken = await SharedPrefManager.getUserToken();
- String refreshToken = await SharedPrefManager.getRefreshToken();
- String mdata = await SharedPrefManager.getData();
- UserInfo info = UserInfo.fromJson(jsonDecode(mdata));
- User user = new User();
- user.data = new UserData(accessToken: accessToken, refreshToken: refreshToken, userInfo: info);
- AppState().setUser = user;
- print(AppState().getUser.data?.userInfo?.roleName);
- navigateWithName(context, AppRoutes.dashboard);
- }
- }),
- 35.height,
- TextButton(
- style: TextButton.styleFrom(
- backgroundColor: Colors.white,
- ),
- onPressed: () {
- if (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA")
- context.setLocale(const Locale("en", "US"));
- else
- context.setLocale(const Locale('ar', 'SA'));
- },
- child: Text(
- LocaleKeys.english.tr(),
- ),
+ mExp(1),
+ Expanded(
+ child: SvgPicture.asset("assets/images/splash_logo.svg"),
),
- mFlex(5),
+ mExp(1),
],
),
),
);
}
+
+ performTimer(BuildContext context) {
+ delay(3).whenComplete(() {
+ navigateReplaceWithName(context, AppRoutes.registerSelection);
+ });
+ }
}
diff --git a/lib/pages/user/vertify_password_page.dart b/lib/pages/user/vertify_password_page.dart
index e043115..8d96da0 100644
--- a/lib/pages/user/vertify_password_page.dart
+++ b/lib/pages/user/vertify_password_page.dart
@@ -33,7 +33,7 @@ class VerifyPasswordPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: appBar(title: LocaleKeys.changePassword.tr()),
+ appBar: appBar(context,title: LocaleKeys.changePassword.tr()),
body: Container(
width: double.infinity,
height: double.infinity,
diff --git a/lib/theme/app_theme.dart b/lib/theme/app_theme.dart
index cd246a3..b1739c4 100644
--- a/lib/theme/app_theme.dart
+++ b/lib/theme/app_theme.dart
@@ -14,7 +14,7 @@ class AppTheme {
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primaryColor: primaryColor,
- primarySwatch: Colors.blue,
+ primarySwatch: Colors.orange,
backgroundColor: Colors.white,
primaryTextTheme: TextTheme(
headline6: TextStyle(color: Colors.white),
diff --git a/lib/theme/colors.dart b/lib/theme/colors.dart
index 8510500..13c9b2f 100644
--- a/lib/theme/colors.dart
+++ b/lib/theme/colors.dart
@@ -7,7 +7,7 @@ Color? accentColorDark = Colors.green[800];
const Color borderColor = Colors.blueGrey;
Color? borderLightColor = Colors.blueGrey[50];
Color backgroudColor =
- Colors.blueGrey[50]!.withOpacity(0.5) ?? Colors.transparent;
+ Colors.blueGrey[50]!.withOpacity(0.5) ;
const Color iconColor = Colors.blueGrey;
Color? headingColor = Colors.blueGrey[800];
Color? txtColor = Colors.blueGrey[500];
diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart
index 41f75e8..10f5655 100644
--- a/lib/utils/utils.dart
+++ b/lib/utils/utils.dart
@@ -74,7 +74,7 @@ Widget mDivider3({double? h}) {
return Container(
width: double.infinity,
height: h ?? 1,
- color: borderLightColor!.withOpacity(0.7) ?? Colors.transparent,
+ color: borderLightColor!.withOpacity(0.7),
);
}
diff --git a/lib/widgets/app_bar.dart b/lib/widgets/app_bar.dart
index 96ce735..fef600b 100644
--- a/lib/widgets/app_bar.dart
+++ b/lib/widgets/app_bar.dart
@@ -4,23 +4,31 @@ import 'package:car_customer_app/extensions/int_extensions.dart';
import 'package:flutter/material.dart';
import 'package:sizer/sizer.dart';
-AppBar appBar({
- Color? backgroundColor,
- double? elevation,
- String? title,
- Color? titleColor,
- bool? isTitleCenter,
- Color? backIconColor,
- List? actions,
-}) {
+AppBar appBar(
+ BuildContext context, {
+ Color? backgroundColor,
+ double? elevation,
+ String? title,
+ Color? titleColor,
+ bool? isTitleCenter,
+ Color? backIconColor,
+ List? actions,
+ bool isRemoveBackButton = false,
+ }) {
return AppBar(
backgroundColor: backgroundColor ?? appBackgroundColor,
elevation: elevation ?? 0,
centerTitle: isTitleCenter ?? true,
+ leading: isRemoveBackButton
+ ? null
+ : IconButton(
+ icon: Icon(Icons.arrow_back_ios, color: Colors.black),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
iconTheme: IconThemeData(
color: backIconColor ?? Colors.black, //change your color here
),
actions: actions,
- title: (title ?? "").toText(fontSize: 20,isBold: true),
+ title: (title ?? "").toText(fontSize: 20, isBold: true),
);
}
diff --git a/lib/widgets/button/show_image_button.dart b/lib/widgets/button/show_image_button.dart
index a34e487..7bfe49d 100644
--- a/lib/widgets/button/show_image_button.dart
+++ b/lib/widgets/button/show_image_button.dart
@@ -4,13 +4,14 @@ import 'package:flutter/material.dart';
import 'package:car_customer_app/extensions/string_extensions.dart';
import 'package:car_customer_app/extensions/int_extensions.dart';
+import '../../classes/colors.dart';
+import 'package:flutter_svg/flutter_svg.dart';
class ShowImageButton extends StatelessWidget {
String icon, title;
VoidCallback onClick;
- ShowImageButton(
- {required this.icon, required this.title, required this.onClick});
+ ShowImageButton({required this.icon, required this.title, required this.onClick});
@override
Widget build(BuildContext context) {
@@ -23,15 +24,23 @@ class ShowImageButton extends StatelessWidget {
Container(
width: double.infinity,
height: 120,
- color: accentColor,
- padding: EdgeInsets.all(30),
- child: Image.asset(
- icon,
- color: Colors.white,
+ child: Card(
+ color: MyColors.darkPrimaryColor,
+ shape: RoundedRectangleBorder(
+ side: BorderSide(color: Colors.transparent, width: 1),
+ borderRadius: BorderRadius.circular(8),
+ ),
+ child: Padding(
+ padding: EdgeInsets.all(26),
+ child: SvgPicture.asset(
+ icon,
+ color: Colors.white,
+ ),
+ ),
),
),
- 12.height,
- title.toText(color: Colors.blue,isBold: true,fontSize: 18),
+ 6.height,
+ title.toText(color: Colors.black, isBold: true, fontSize: 16),
],
),
),
diff --git a/lib/widgets/dialog/message_dialog.dart b/lib/widgets/dialog/message_dialog.dart
index 62f4cc7..db39d51 100644
--- a/lib/widgets/dialog/message_dialog.dart
+++ b/lib/widgets/dialog/message_dialog.dart
@@ -25,7 +25,7 @@ class MessageDialog extends StatelessWidget {
40.height,
ShowFillButton(
title: buttonTitle ?? "Continue",
- width: double.infinity,
+ maxWidth: double.infinity,
onPressed: () {
onClick!();
},
diff --git a/lib/widgets/dialog/otp_dialog.dart b/lib/widgets/dialog/otp_dialog.dart
index 6c393b6..ebdb553 100644
--- a/lib/widgets/dialog/otp_dialog.dart
+++ b/lib/widgets/dialog/otp_dialog.dart
@@ -83,7 +83,7 @@ class OtpDialog extends StatelessWidget {
40.height,
ShowFillButton(
title: "Check Code",
- width: double.infinity,
+ maxWidth: double.infinity,
onPressed: () {
onClick(code);
},
diff --git a/lib/widgets/dropdown/dropdow_field.dart b/lib/widgets/dropdown/dropdow_field.dart
index 05d7190..b3b3cb2 100644
--- a/lib/widgets/dropdown/dropdow_field.dart
+++ b/lib/widgets/dropdown/dropdow_field.dart
@@ -1,15 +1,18 @@
-
import 'package:car_customer_app/extensions/string_extensions.dart';
import 'package:car_customer_app/theme/colors.dart';
import 'package:car_customer_app/utils/utils.dart';
import 'package:flutter/material.dart';
+import '../../classes/colors.dart';
+
class DropValue {
int id;
String value;
String subValue;
- DropValue(this.id, this.value,this.subValue);
+ DropValue(this.id, this.value, this.subValue);
+
+ bool operator ==(o) => o is DropValue && o.value == value && o.id == id;
}
class DropdownField extends StatefulWidget {
@@ -26,30 +29,30 @@ class DropdownField extends StatefulWidget {
class _DropdownFieldState extends State {
DropValue? dropdownValue;
List defaultV = [
- new DropValue(1, "One",""),
- new DropValue(2, "Two",""),
+ new DropValue(1, "One", ""),
+ new DropValue(2, "Two", ""),
];
@override
Widget build(BuildContext context) {
return Container(
decoration: containerColorRadiusBorderWidth(
- Colors.transparent,
- 4,
- borderColor,
- 0.5,
+ MyColors.textFieldColor,
+ 8,
+ MyColors.textFieldColor,
+ 0,
),
- margin: EdgeInsets.all(2),
+ margin: EdgeInsets.all(0),
padding: EdgeInsets.only(left: 8, right: 8),
child: DropdownButton(
- value: dropdownValue,
+ value: dropdownValue ?? null,
icon: const Icon(Icons.keyboard_arrow_down_sharp),
elevation: 16,
iconSize: 16,
iconEnabledColor: borderColor,
iconDisabledColor: borderColor,
isExpanded: true,
- style: const TextStyle(color: Colors.black),
+ style: const TextStyle(color: Colors.black, fontWeight: FontWeight.w600),
hint: (widget.hint ?? "").toText12(color: borderColor),
underline: Container(
height: 0,
diff --git a/lib/widgets/show_fill_button.dart b/lib/widgets/show_fill_button.dart
index f0aa328..3fe3001 100644
--- a/lib/widgets/show_fill_button.dart
+++ b/lib/widgets/show_fill_button.dart
@@ -3,36 +3,68 @@ import 'package:car_customer_app/theme/colors.dart';
import 'package:flutter/material.dart';
+import '../classes/colors.dart';
+
class ShowFillButton extends StatelessWidget {
String title;
VoidCallback onPressed;
Color txtColor;
- double elevation, radius, width;
+ double elevation, radius, maxWidth, maxHeight, fontSize, horizontalPadding, horizontalMargin, verticalMargin;
+ bool isFlatButton, isBold;
ShowFillButton({
required this.title,
required this.onPressed,
this.txtColor = Colors.white,
this.elevation = 4,
- this.radius = 6,
- this.width = 88,
+ this.radius = 8,
+ this.maxWidth = 88,
+ this.maxHeight = 45,
+ this.fontSize = 16,
+ this.horizontalPadding = 16,
+ this.isFlatButton = false,
+ this.isBold = true,
+ this.horizontalMargin = 0,
+ this.verticalMargin = 0,
});
@override
Widget build(BuildContext context) {
- return ElevatedButton(
- style: ElevatedButton.styleFrom(
- onPrimary: Colors.black87,
- primary: accentColor,
- minimumSize: Size(width, 45),
- padding: EdgeInsets.symmetric(horizontal: 16),
- elevation: elevation,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.all(Radius.circular(radius)),
+ return isFlatButton
+ ? Container(
+ child: showButton(),
+ height: 30,
+ padding: const EdgeInsets.only(
+ left: 20,
+ right: 20,
+ ),
+ )
+ : ConstrainedBox(
+ constraints: BoxConstraints(
+ minHeight: maxHeight,
+ minWidth: maxWidth,
+ maxHeight: maxHeight,
+ maxWidth: maxWidth,
+ ),
+ child: showButton(),
+ );
+ }
+
+ Widget showButton() {
+ return Container(
+ decoration: isFlatButton ? null : MyColors.gradientButton,
+ margin: EdgeInsets.symmetric(horizontal: horizontalMargin, vertical: verticalMargin),
+ child: MaterialButton(
+ onPressed: onPressed,
+ shape: new RoundedRectangleBorder(
+ borderRadius: new BorderRadius.circular(radius),
+ ),
+ child: title.toText(
+ fontSize: fontSize,
+ isBold: isBold,
+ color: txtColor,
),
),
- onPressed: onPressed,
- child: title.toUpperCase().toText(fontSize: 16, isBold: true),
);
}
}
diff --git a/lib/widgets/tab/login_email_tab.dart b/lib/widgets/tab/login_email_tab.dart
index 2aec688..40a07fe 100644
--- a/lib/widgets/tab/login_email_tab.dart
+++ b/lib/widgets/tab/login_email_tab.dart
@@ -2,6 +2,8 @@ import 'package:car_customer_app/generated/locale_keys.g.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
+import '../../classes/colors.dart';
+
enum ClassType { EMAIL, NUMBER }
class LoginEmailTab extends StatefulWidget {
@@ -31,13 +33,16 @@ class _LoginEmailTabState extends State {
child: Container(
width: double.infinity,
height: 45,
- color: type == ClassType.NUMBER ? Colors.blue : Colors.transparent,
+ decoration: BoxDecoration(
+ color: Colors.transparent,
+ border: Border.all(color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.transparent, width: 2),
+ borderRadius: BorderRadius.all(Radius.circular(8)),
+ ),
child: Center(
child: Text(
LocaleKeys.number.tr(),
style: TextStyle(
- color: type == ClassType.NUMBER ? Colors.white : Colors.black,
- fontWeight: FontWeight.bold,
+ color: Colors.black,
),
),
),
@@ -53,15 +58,19 @@ class _LoginEmailTabState extends State {
child: Container(
width: double.infinity,
height: 45,
- color: type == ClassType.EMAIL ? Colors.blue : Colors.transparent,
+ decoration: BoxDecoration(
+ color: Colors.transparent,
+ border: Border.all(color: type == ClassType.EMAIL ? MyColors.darkPrimaryColor : Colors.transparent, width: 2),
+ borderRadius: BorderRadius.all(Radius.circular(8)),
+ ),
child: Center(
- child: Text(
- LocaleKeys.email.tr(),
- style: TextStyle(
- color: type == ClassType.EMAIL ? Colors.white : Colors.black,
- fontWeight: FontWeight.bold,
+ child: Text(
+ LocaleKeys.email.tr(),
+ style: TextStyle(
+ color: Colors.black,
+ ),
),
- )),
+ ),
),
),
),
diff --git a/lib/widgets/txt_field.dart b/lib/widgets/txt_field.dart
index 5b9d80a..8a36c38 100644
--- a/lib/widgets/txt_field.dart
+++ b/lib/widgets/txt_field.dart
@@ -5,6 +5,8 @@ import 'package:car_customer_app/extensions/string_extensions.dart';
import 'package:flutter/material.dart';
import 'package:sizer/sizer.dart';
+import '../classes/colors.dart';
+
class TxtField extends StatelessWidget {
TextEditingController controller = new TextEditingController();
String? value;
@@ -16,17 +18,15 @@ class TxtField extends StatelessWidget {
bool isNeedClickAll;
bool isButtonEnable;
double? elevation;
- Function? onTap;
+ VoidCallback? onTap;
String? buttonTitle;
int? maxLines;
bool isSidePaddingZero;
bool isNeedBorder;
bool? isPasswordEnabled;
- bool isCursorEnd;
Function(String)? onChanged;
TextInputType? keyboardType;
-
TxtField({
this.value,
this.lable,
@@ -40,73 +40,73 @@ class TxtField extends StatelessWidget {
this.isButtonEnable = false,
this.buttonTitle,
this.maxLines,
- this.isSidePaddingZero=false,
- this.isNeedBorder=true,
+ this.isSidePaddingZero = false,
+ this.isNeedBorder = true,
this.onChanged,
this.isPasswordEnabled,
this.keyboardType,
- this.isCursorEnd=false,
});
@override
Widget build(BuildContext context) {
controller.text = value ?? "";
- if(isCursorEnd)
- controller.selection = TextSelection.fromPosition(TextPosition(offset: controller.text.length));
+ controller.selection = TextSelection.fromPosition(TextPosition(offset: controller.text.length));
return InkWell(
onTap: isNeedClickAll == false
? null
: () {
- onTap!();
- },
+ onTap!();
+ },
customBorder: inkWellCorner(),
child: Row(
children: [
Expanded(
- child: Card(
- elevation: elevation,
- margin: isSidePaddingZero?EdgeInsets.zero:null,
+ child: Container(
+ decoration: BoxDecoration(
+ color: MyColors.textFieldColor,
+ borderRadius: BorderRadius.all(Radius.circular(8)),
+ ),
child: TextField(
- keyboardType: TextInputType.number,
+ keyboardType: keyboardType,
autofocus: false,
controller: controller,
enabled: isNeedClickAll == true ? false : true,
maxLines: maxLines,
onTap: () {},
- obscureText: isPasswordEnabled??false,
+ obscureText: isPasswordEnabled ?? false,
onChanged: onChanged,
decoration: InputDecoration(
labelText: lable,
alignLabelWithHint: true,
fillColor: Colors.white,
focusedBorder: OutlineInputBorder(
- borderSide: BorderSide(color: accentColor, width:isNeedBorder? 1.0:0),
- borderRadius: BorderRadius.circular(4.0),
+ borderSide: BorderSide(color: MyColors.darkPrimaryColor, width: isNeedBorder ? 1.0 : 0),
+ borderRadius: BorderRadius.circular(8.0),
),
enabledBorder: OutlineInputBorder(
- borderSide: BorderSide(color: borderColor, width:isNeedBorder? 1.0:0),
- borderRadius: BorderRadius.circular(4.0),
+ borderSide: BorderSide(color: MyColors.textFieldColor, width: isNeedBorder ? 1.0 : 0),
+ borderRadius: BorderRadius.circular(8.0),
),
disabledBorder: OutlineInputBorder(
- borderSide: BorderSide(color: borderColor, width:isNeedBorder? 1.0:0),
- borderRadius: BorderRadius.circular(4.0),
+ borderSide: BorderSide(color: MyColors.textFieldColor, width: isNeedBorder ? 1.0 : 0),
+ borderRadius: BorderRadius.circular(8.0),
),
prefixIcon: prefixData != null
? Icon(
- Icons.search,
- color: borderColor,
- )
+ Icons.search,
+ color: borderColor,
+ )
: null,
labelStyle: TextStyle(color: borderColor, fontSize: 13.sp),
hintStyle: TextStyle(color: borderColor, fontSize: 9.sp),
hintText: hint ?? "",
contentPadding: prefixData == null
? EdgeInsets.only(
- left: 12,
- right: 12,
- top: maxLines != null ? 12 : 0,
- bottom: maxLines != null ? 12 : 0,
- )
+ left: 12,
+ right: 12,
+ top: maxLines != null ? 12 : 0,
+ bottom: maxLines != null ? 12 : 0,
+ )
: EdgeInsets.zero,
),
),
@@ -118,8 +118,8 @@ class TxtField extends StatelessWidget {
onTap: isNeedClickAll
? null
: () {
- controller.clear();
- },
+ controller.clear();
+ },
child: Container(
width: 55,
height: 55,
@@ -137,7 +137,7 @@ class TxtField extends StatelessWidget {
if (isButtonEnable)
Material(
child: InkWell(
- onTap: () {},
+ onTap: onTap,
customBorder: inkWellCorner(),
child: Container(
height: 55,
diff --git a/pubspec.lock b/pubspec.lock
deleted file mode 100644
index f7f943a..0000000
--- a/pubspec.lock
+++ /dev/null
@@ -1,549 +0,0 @@
-# Generated by pub
-# See https://dart.dev/tools/pub/glossary#lockfile
-packages:
- args:
- dependency: transitive
- description:
- name: args
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.3.0"
- async:
- dependency: transitive
- description:
- name: async
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.8.2"
- boolean_selector:
- dependency: transitive
- description:
- name: boolean_selector
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.1.0"
- characters:
- dependency: transitive
- description:
- name: characters
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.2.0"
- charcode:
- dependency: transitive
- description:
- name: charcode
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.3.1"
- clock:
- dependency: transitive
- description:
- name: clock
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.1.0"
- collection:
- dependency: transitive
- description:
- name: collection
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.15.0"
- cross_file:
- dependency: transitive
- description:
- name: cross_file
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.3.2"
- crypto:
- dependency: transitive
- description:
- name: crypto
- url: "https://pub.dartlang.org"
- source: hosted
- version: "3.0.1"
- cupertino_icons:
- dependency: "direct main"
- description:
- name: cupertino_icons
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.4"
- easy_localization:
- dependency: "direct main"
- description:
- name: easy_localization
- url: "https://pub.dartlang.org"
- source: hosted
- version: "3.0.0"
- easy_logger:
- dependency: transitive
- description:
- name: easy_logger
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.0.2"
- fake_async:
- dependency: transitive
- description:
- name: fake_async
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.2.0"
- ffi:
- dependency: transitive
- description:
- name: ffi
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.1.2"
- file:
- dependency: transitive
- description:
- name: file
- url: "https://pub.dartlang.org"
- source: hosted
- version: "6.1.2"
- flutter:
- dependency: "direct main"
- description: flutter
- source: sdk
- version: "0.0.0"
- flutter_lints:
- dependency: "direct dev"
- description:
- name: flutter_lints
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.4"
- flutter_localizations:
- dependency: transitive
- description: flutter
- source: sdk
- version: "0.0.0"
- flutter_password_strength:
- dependency: "direct main"
- description:
- name: flutter_password_strength
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.1.6"
- flutter_plugin_android_lifecycle:
- dependency: transitive
- description:
- name: flutter_plugin_android_lifecycle
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.5"
- flutter_svg:
- dependency: "direct dev"
- description:
- name: flutter_svg
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.3"
- flutter_test:
- dependency: "direct dev"
- description: flutter
- source: sdk
- version: "0.0.0"
- flutter_web_plugins:
- dependency: transitive
- description: flutter
- source: sdk
- version: "0.0.0"
- fluttertoast:
- dependency: "direct dev"
- description:
- name: fluttertoast
- url: "https://pub.dartlang.org"
- source: hosted
- version: "8.0.9"
- http:
- dependency: "direct dev"
- description:
- name: http
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.13.4"
- http_parser:
- dependency: transitive
- description:
- name: http_parser
- url: "https://pub.dartlang.org"
- source: hosted
- version: "4.0.0"
- image_picker:
- dependency: "direct main"
- description:
- name: image_picker
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.8.4+11"
- image_picker_for_web:
- dependency: transitive
- description:
- name: image_picker_for_web
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.1.6"
- image_picker_platform_interface:
- dependency: transitive
- description:
- name: image_picker_platform_interface
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.4.1"
- injector:
- dependency: "direct dev"
- description:
- name: injector
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.0"
- intl:
- dependency: transitive
- description:
- name: intl
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.17.0"
- js:
- dependency: transitive
- description:
- name: js
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.6.3"
- lints:
- dependency: transitive
- description:
- name: lints
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.1"
- matcher:
- dependency: transitive
- description:
- name: matcher
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.12.11"
- material_color_utilities:
- dependency: transitive
- description:
- name: material_color_utilities
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.1.3"
- meta:
- dependency: transitive
- description:
- name: meta
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.7.0"
- nested:
- dependency: transitive
- description:
- name: nested
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.0"
- path:
- dependency: transitive
- description:
- name: path
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.8.0"
- path_drawing:
- dependency: transitive
- description:
- name: path_drawing
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.0"
- path_parsing:
- dependency: transitive
- description:
- name: path_parsing
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.0"
- path_provider:
- dependency: "direct dev"
- description:
- name: path_provider
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.7"
- path_provider_android:
- dependency: transitive
- description:
- name: path_provider_android
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.9"
- path_provider_ios:
- dependency: transitive
- description:
- name: path_provider_ios
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.7"
- path_provider_linux:
- dependency: transitive
- description:
- name: path_provider_linux
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.1.2"
- path_provider_macos:
- dependency: transitive
- description:
- name: path_provider_macos
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.4"
- path_provider_platform_interface:
- dependency: transitive
- description:
- name: path_provider_platform_interface
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.1"
- path_provider_windows:
- dependency: transitive
- description:
- name: path_provider_windows
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.4"
- permission_handler:
- dependency: "direct dev"
- description:
- name: permission_handler
- url: "https://pub.dartlang.org"
- source: hosted
- version: "9.2.0"
- permission_handler_android:
- dependency: transitive
- description:
- name: permission_handler_android
- url: "https://pub.dartlang.org"
- source: hosted
- version: "9.0.2+1"
- permission_handler_apple:
- dependency: transitive
- description:
- name: permission_handler_apple
- url: "https://pub.dartlang.org"
- source: hosted
- version: "9.0.4"
- permission_handler_platform_interface:
- dependency: transitive
- description:
- name: permission_handler_platform_interface
- url: "https://pub.dartlang.org"
- source: hosted
- version: "3.7.0"
- permission_handler_windows:
- dependency: transitive
- description:
- name: permission_handler_windows
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.1.0"
- petitparser:
- dependency: transitive
- description:
- name: petitparser
- url: "https://pub.dartlang.org"
- source: hosted
- version: "4.4.0"
- platform:
- dependency: transitive
- description:
- name: platform
- url: "https://pub.dartlang.org"
- source: hosted
- version: "3.1.0"
- plugin_platform_interface:
- dependency: transitive
- description:
- name: plugin_platform_interface
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.2"
- process:
- dependency: transitive
- description:
- name: process
- url: "https://pub.dartlang.org"
- source: hosted
- version: "4.2.4"
- provider:
- dependency: "direct dev"
- description:
- name: provider
- url: "https://pub.dartlang.org"
- source: hosted
- version: "6.0.1"
- shared_preferences:
- dependency: "direct dev"
- description:
- name: shared_preferences
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.9"
- shared_preferences_android:
- dependency: transitive
- description:
- name: shared_preferences_android
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.9"
- shared_preferences_ios:
- dependency: transitive
- description:
- name: shared_preferences_ios
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.8"
- shared_preferences_linux:
- dependency: transitive
- description:
- name: shared_preferences_linux
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.3"
- shared_preferences_macos:
- dependency: transitive
- description:
- name: shared_preferences_macos
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.2"
- shared_preferences_platform_interface:
- dependency: transitive
- description:
- name: shared_preferences_platform_interface
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.0"
- shared_preferences_web:
- dependency: transitive
- description:
- name: shared_preferences_web
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.2"
- shared_preferences_windows:
- dependency: transitive
- description:
- name: shared_preferences_windows
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.3"
- sizer:
- dependency: "direct dev"
- description:
- name: sizer
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.15"
- sky_engine:
- dependency: transitive
- description: flutter
- source: sdk
- version: "0.0.99"
- source_span:
- dependency: transitive
- description:
- name: source_span
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.8.1"
- stack_trace:
- dependency: transitive
- description:
- name: stack_trace
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.10.0"
- stream_channel:
- dependency: transitive
- description:
- name: stream_channel
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.1.0"
- string_scanner:
- dependency: transitive
- description:
- name: string_scanner
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.1.0"
- term_glyph:
- dependency: transitive
- description:
- name: term_glyph
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.2.0"
- test_api:
- dependency: transitive
- description:
- name: test_api
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.4.8"
- typed_data:
- dependency: transitive
- description:
- name: typed_data
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.3.0"
- universal_io:
- dependency: transitive
- description:
- name: universal_io
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.4"
- vector_math:
- dependency: transitive
- description:
- name: vector_math
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.1.1"
- win32:
- dependency: transitive
- description:
- name: win32
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.3.1"
- xdg_directories:
- dependency: transitive
- description:
- name: xdg_directories
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.2.0"
- xml:
- dependency: transitive
- description:
- name: xml
- url: "https://pub.dartlang.org"
- source: hosted
- version: "5.3.1"
-sdks:
- dart: ">=2.15.0 <3.0.0"
- flutter: ">=2.8.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index 500fee2..bc7ce4d 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -93,17 +93,9 @@ flutter:
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
- # fonts:
- # - family: Schyler
- # fonts:
- # - asset: fonts/Schyler-Regular.ttf
- # - asset: fonts/Schyler-Italic.ttf
- # style: italic
- # - family: Trajan Pro
- # fonts:
- # - asset: fonts/TrajanPro.ttf
- # - asset: fonts/TrajanPro_Bold.ttf
- # weight: 700
- #
+ fonts:
+ - family: Poppins
+ fonts:
+ - asset: assets/fonts/Poppins-Medium.ttf
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
diff --git a/resources/langs/ar-SA.json b/resources/langs/ar-SA.json
index 212d561..165568e 100644
--- a/resources/langs/ar-SA.json
+++ b/resources/langs/ar-SA.json
@@ -65,7 +65,7 @@
"edit" : "تعديل",
"imageDeleted" : "تم حذف الصوره",
"dashboard" : "الصفحه الرئيسيه",
- "termsOfService":"من خلال إنشاء حساب فإنك توافق على شروط الخدمة و\n سياسة الخصوصية",
+ "termsOfService":"من خلال إنشاء حساب فإنك توافق على",
"userInformation": "معلومات المتسخدم",
"faceRecognition": "تحقق مع بصمة الوجه",
"fingerPrint" : "تحقق مع بصمة الاصبع",
@@ -111,5 +111,18 @@
"female": "Hello girl :) {}"
}
},
- "reset_locale": "Reset Language"
+ "reset_locale": "Reset Language",
+ "welcomeDes": "أنت مكان واحد لكل ما تحتاجه سيارتك",
+ "log_in": "تسجيل الدخول",
+ "send": "إرسال",
+ "retrivePassword": "استرجع كلمة المرور بإحدى الطرق التالية",
+ "retriveOnPhone": "سوف نرسل الاختيار إلى رقم هاتفك المحمول المسجل",
+ "retriveOnEmail": "سوف نرسل الاختيار إلى عنوان بريدك الإلكتروني المسجل",
+ "enterPhoneForVerfication": "الرجاء إدخال رقم هاتفك وسنرسل لك رمز التحقق",
+ "welcomeBack": "مرحبًا بعودتك!!!",
+ "selectYourCountry": "اختر بلدك",
+ "chooseCountry": "اختر الدوله",
+ "terms": "بنود الخدمة وخصوصية السياسة",
+ "profileMsg": "أدخل التفاصيل أدناه وأكمل معلومات الملف الشخصي",
+ "save": "حفظ"
}
\ No newline at end of file
diff --git a/resources/langs/en-US.json b/resources/langs/en-US.json
index 522b1be..49f87cc 100644
--- a/resources/langs/en-US.json
+++ b/resources/langs/en-US.json
@@ -65,7 +65,7 @@
"edit" : "EDIT",
"imageDeleted" : "Image is Deleted",
"dashboard" : "Dashboard/Main Page",
- "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",
"userInformation": "User Information",
"faceRecognition": "Face Recognition",
"fingerPrint" : "Finger Print",
@@ -111,5 +111,18 @@
"female": "Hello girl :) {}"
}
},
- "reset_locale": "Reset Language"
+ "reset_locale": "Reset Language",
+ "welcomeDes": "You one stop place all your car needs",
+ "log_in": "Log In",
+ "send": "Send",
+ "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",
+ "welcomeBack": "Welcome Back!!!",
+ "selectYourCountry": "Select Your Country",
+ "chooseCountry": "Choose Country",
+ "terms": "Terms of Service and Privacy Policy",
+ "profileMsg": "Enter the details below and complete the profile info",
+ "save": "Save"
}
\ No newline at end of file