From ff8c71a360067134b64c206b07a972de50bbd889 Mon Sep 17 00:00:00 2001 From: FaizHashmiCS22 Date: Thu, 23 Mar 2023 11:06:43 +0300 Subject: [PATCH 1/3] Added few assets --- assets/icons/branches_icon.svg | 9 ++ assets/icons/maintenance_icon.svg | 6 + assets/icons/modifications_icon.svg | 9 ++ assets/icons/requests_icon.svg | 5 + assets/icons/star_icon.svg | 9 ++ .../customer_appointment_slider_widget.dart | 103 ++++++++++++++++++ ...> provider_appointment_slider_widget.dart} | 64 +---------- 7 files changed, 145 insertions(+), 60 deletions(-) create mode 100644 assets/icons/branches_icon.svg create mode 100644 assets/icons/maintenance_icon.svg create mode 100644 assets/icons/modifications_icon.svg create mode 100644 assets/icons/requests_icon.svg create mode 100644 assets/icons/star_icon.svg create mode 100644 lib/widgets/common_widgets/customer_appointment_slider_widget.dart rename lib/widgets/common_widgets/{appointment_slider_widget.dart => provider_appointment_slider_widget.dart} (57%) diff --git a/assets/icons/branches_icon.svg b/assets/icons/branches_icon.svg new file mode 100644 index 0000000..c0ba51c --- /dev/null +++ b/assets/icons/branches_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/icons/maintenance_icon.svg b/assets/icons/maintenance_icon.svg new file mode 100644 index 0000000..ac739fd --- /dev/null +++ b/assets/icons/maintenance_icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/modifications_icon.svg b/assets/icons/modifications_icon.svg new file mode 100644 index 0000000..58692b8 --- /dev/null +++ b/assets/icons/modifications_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/icons/requests_icon.svg b/assets/icons/requests_icon.svg new file mode 100644 index 0000000..c6fd34a --- /dev/null +++ b/assets/icons/requests_icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/star_icon.svg b/assets/icons/star_icon.svg new file mode 100644 index 0000000..4000dca --- /dev/null +++ b/assets/icons/star_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/lib/widgets/common_widgets/customer_appointment_slider_widget.dart b/lib/widgets/common_widgets/customer_appointment_slider_widget.dart new file mode 100644 index 0000000..93b0f94 --- /dev/null +++ b/lib/widgets/common_widgets/customer_appointment_slider_widget.dart @@ -0,0 +1,103 @@ +import 'package:carousel_slider/carousel_slider.dart'; +import 'package:flutter/material.dart'; +import 'package:mc_common_app/classes/consts.dart'; +import 'package:mc_common_app/extensions/int_extensions.dart'; +import 'package:mc_common_app/extensions/string_extensions.dart'; +import 'package:mc_common_app/theme/colors.dart'; +import 'package:mc_common_app/widgets/extensions/extensions_widget.dart'; + +class CustomerAppointmentSliderWidget extends StatelessWidget { + const CustomerAppointmentSliderWidget({Key? key}) : super(key: key); + + Widget buildAppointmentContainerForCustomer() { + return Container( + margin: const EdgeInsets.only(bottom: 21, left: 21, right: 21, top: 7), + child: Column( + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + "assets/images/bn_car.jpeg", + width: 56, + height: 56, + fit: BoxFit.fill, + ).toCircle(borderRadius: 100), + 8.width, + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + "Al Aziz Service Station".toText(color: MyColors.black, isBold: true, fontSize: 16), + Row( + children: [ + MyAssets.miniClock.buildSvg(height: 12), + 2.width, + "08:00 to 08:30 25 July, 2023".toText( + color: MyColors.lightTextColor, + fontSize: 12, + ), + ], + ), + 9.height, + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + "Appointment Details".toText( + color: MyColors.primaryColor, + isUnderLine: true, + isBold: true, + fontSize: 14, + ), + const Icon(Icons.arrow_forward), + ], + ), + ], + ), + ), + ], + ), + ], + ).toWhiteContainer(width: double.infinity, allPading: 12), + ); + } + + @override + Widget build(BuildContext context) { + return CarouselSlider.builder( + options: CarouselOptions( + height: 140, + viewportFraction: 1.0, + enlargeCenterPage: false, + enableInfiniteScroll: false, + // + // onPageChanged: (index) { + // setState(() { + // _current = index; + // }); + // }, + ), + itemCount: 10, + itemBuilder: (BuildContext context, int itemIndex, int pageViewIndex) => buildAppointmentContainerForCustomer(), + ); + } + + Widget showServices(String title) { + return Row( + children: [ + const Icon( + Icons.ac_unit, + color: MyColors.primaryColor, + size: 18, + ), + 8.width, + title.toText( + fontSize: 14, + isBold: true, + ), + ], + ); + } +} diff --git a/lib/widgets/common_widgets/appointment_slider_widget.dart b/lib/widgets/common_widgets/provider_appointment_slider_widget.dart similarity index 57% rename from lib/widgets/common_widgets/appointment_slider_widget.dart rename to lib/widgets/common_widgets/provider_appointment_slider_widget.dart index dbf7827..46f2053 100644 --- a/lib/widgets/common_widgets/appointment_slider_widget.dart +++ b/lib/widgets/common_widgets/provider_appointment_slider_widget.dart @@ -1,17 +1,16 @@ import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter/material.dart'; -import 'package:mc_common_app/classes/consts.dart'; import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/theme/colors.dart'; import 'package:mc_common_app/widgets/extensions/extensions_widget.dart'; -class AppointmentSliderWidget extends StatelessWidget { - const AppointmentSliderWidget({Key? key}) : super(key: key); +class ProviderAppointmentSliderWidget extends StatelessWidget { + const ProviderAppointmentSliderWidget({Key? key}) : super(key: key); Widget buildAppointmentContainerForProvider() { return Container( - margin: EdgeInsets.only(bottom: 21, left: 21, right: 21, top: 7), + margin: const EdgeInsets.only(bottom: 21, left: 21, right: 21, top: 7), child: Column( children: [ Row( @@ -74,61 +73,6 @@ class AppointmentSliderWidget extends StatelessWidget { ); } - Widget buildAppointmentSliderForConsumer() { - return Container( - margin: EdgeInsets.only(bottom: 21, left: 21, right: 21, top: 7), - child: Column( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - "assets/images/bn_car.jpeg", - width: 56, - height: 56, - fit: BoxFit.fill, - ).toCircle(borderRadius: 100), - 8.width, - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - "Al Aziz Service Station".toText(color: MyColors.black, isBold: true, fontSize: 16), - Row( - children: [ - MyAssets.miniClock.buildSvg(height: 12), - 2.width, - "08:00 to 08:30 25 July, 2023".toText( - color: MyColors.lightTextColor, - fontSize: 12, - ), - ], - ), - 9.height, - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - "Appointment Details".toText( - color: MyColors.primaryColor, - isUnderLine: true, - isBold: true, - fontSize: 14, - ), - const Icon(Icons.arrow_forward), - ], - ), - ], - ), - ), - ], - ), - ], - ).toWhiteContainer(width: double.infinity, allPading: 12), - ); - } - @override Widget build(BuildContext context) { return CarouselSlider.builder( @@ -145,7 +89,7 @@ class AppointmentSliderWidget extends StatelessWidget { // }, ), itemCount: 10, - itemBuilder: (BuildContext context, int itemIndex, int pageViewIndex) => buildAppointmentSliderForConsumer(), + itemBuilder: (BuildContext context, int itemIndex, int pageViewIndex) => buildAppointmentContainerForProvider(), ); } From 6fb86330f11c725182dee7169a8222fe2e4d8a9d Mon Sep 17 00:00:00 2001 From: FaizHashmiCS22 Date: Thu, 23 Mar 2023 11:33:56 +0300 Subject: [PATCH 2/3] Added few assets --- lib/generated/codegen_loader.g.dart | 42 +++++++++++++++++++++++++++-- lib/generated/locale_keys.g.dart | 19 +++++++++++++ lib/main.dart | 1 - lib/theme/app_theme.dart | 4 +-- pubspec.yaml | 2 +- 5 files changed, 62 insertions(+), 6 deletions(-) diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart index 2bf0a3e..6dd9b28 100644 --- a/lib/generated/codegen_loader.g.dart +++ b/lib/generated/codegen_loader.g.dart @@ -161,7 +161,26 @@ class CodegenLoader extends AssetLoader{ "recommended_ads": "الإعلانات الموصى بها", "upcoming_appointment": "الموعد القادم", "my_service_providers": "مزودي الخدمة الجدد", - "appointment_details": "تفاصيل الموعد" + "appointment_details": "تفاصيل الموعد", + "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 en_US = { "firstTimeLogIn": "First Time Log In", @@ -310,7 +329,26 @@ static const Map en_US = { "recommended_ads": "Recommended Ads", "upcoming_appointment": "Upcoming Appointment", "my_service_providers": "My Recent Service Providers", - "appointment_details": "Appointment Details" + "appointment_details": "Appointment Details", + "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> mapLocales = {"ar_SA": ar_SA, "en_US": en_US}; } diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 6b2c80b..8c87b09 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -126,5 +126,24 @@ abstract class LocaleKeys { static const upcoming_appointment = 'upcoming_appointment'; static const my_service_providers = 'my_service_providers'; static const appointment_details = 'appointment_details'; + static const no_city_available = 'no_city_available'; + static const branch_created = 'branch_created'; + static const branch_updated = 'branch_updated'; + static const branch_deleted = 'branch_deleted'; + static const dashboard_main = 'dashboard_main'; + static const logo_brand = 'logo_brand'; + static const remove = 'remove'; + static const no_branch = 'no_branch'; + static const login_once = 'login_once'; + static const defineLicenese = 'defineLicenese'; + static const description = 'description'; + static const attachFile = 'attachFile'; + static const branchLocation = 'branchLocation'; + static const tapToEdit = 'tapToEdit'; + static const myServiceBranches = 'myServiceBranches'; + static const enter_licence_detail = 'enter_licence_detail'; + static const country = 'country'; + static const city = 'city'; + static const editServices = 'editServices'; } diff --git a/lib/main.dart b/lib/main.dart index 20bb940..44fdfbb 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -80,7 +80,6 @@ class MyApp extends StatelessWidget { navigatorKey: navigatorKey, theme: AppTheme.getTheme( isArabic: EasyLocalization.of(context)?.locale.languageCode == "ar", - englishFont: MyFonts.poppinsFont, ), debugShowCheckedModeBanner: false, localizationsDelegates: delegates, diff --git a/lib/theme/app_theme.dart b/lib/theme/app_theme.dart index 6f32f57..ffe07b2 100644 --- a/lib/theme/app_theme.dart +++ b/lib/theme/app_theme.dart @@ -3,8 +3,8 @@ import 'package:flutter/material.dart'; import 'colors.dart'; class AppTheme { - static getTheme({required isArabic, String? englishFont}) => ThemeData( - fontFamily: !isArabic ? englishFont : null, + static getTheme({required isArabic}) => ThemeData( + fontFamily: !isArabic ? "Poppins" : null, primaryColor: primaryColor, primaryTextTheme: const TextTheme( titleLarge: TextStyle(color: Colors.white), diff --git a/pubspec.yaml b/pubspec.yaml index e2d2ab8..b426b6e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -57,7 +57,7 @@ flutter: - assets/langs/ - assets/icons/ - assets/images/ - - assets/fonts/ + - assets/fonts/Poppins-Medium.ttf fonts: - family: Poppins From fe337f209192b2d367c21aae4c523c469ebee45a Mon Sep 17 00:00:00 2001 From: FaizHashmiCS22 Date: Sun, 26 Mar 2023 12:50:46 +0300 Subject: [PATCH 3/3] Updated Assets Path and Added Few Widgets --- assets/langs/ar-SA.json | 7 +- assets/langs/en-US.json | 7 +- lib/classes/app_state.dart | 13 +- lib/classes/consts.dart | 161 ++++---- lib/generated/codegen_loader.g.dart | 354 ------------------ lib/generated/locale_keys.g.dart | 149 -------- lib/main.dart | 11 +- lib/theme/app_theme.dart | 18 +- lib/view_models/base_view_model.dart | 6 - lib/views/splash/splash_page.dart | 7 +- lib/views/user/edit_account_page.dart | 5 +- .../user/forget_password_method_page.dart | 4 +- .../user/login_method_selection_page.dart | 21 +- lib/views/user/login_verification_page.dart | 8 +- lib/views/user/login_verify_account_page.dart | 4 +- lib/views/user/register_selection_page.dart | 15 +- lib/views/user/vertify_password_page.dart | 4 +- lib/widgets/common_widgets/ad_widget.dart | 3 +- .../customer_appointment_slider_widget.dart | 2 +- .../common_widgets/my_service_provider.dart | 3 +- .../provider_appointment_slider_widget.dart | 16 +- lib/widgets/extensions/extensions_widget.dart | 4 +- 22 files changed, 184 insertions(+), 638 deletions(-) delete mode 100644 lib/generated/codegen_loader.g.dart delete mode 100644 lib/generated/locale_keys.g.dart diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 495e501..c4861e1 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -164,5 +164,10 @@ "enter_licence_detail": "الرجاء إدخال تفاصيل السجلات التجارية وإرفاق صور الترخيص", "country": "بلد", "city": "مدينة", - "editServices": "تحرير الخدمات" + "editServices": "تحرير الخدمات", + "maintenance": "صيانة", + "accessories_modifications": "الملحقات والتعديلات", + "my_recent_providers": "مزودي الخدمة الجدد", + "my_active_ads": "إعلاناتي النشطة", + "recommended_Ads": "الإعلانات الموصى بها" } \ No newline at end of file diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index e477a88..575756a 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -164,5 +164,10 @@ "enter_licence_detail": "Please enter the detail for commercial records and attach the license images", "country": "country", "city": "city", - "editServices": "Edit Services" + "editServices": "Edit Services", + "maintenance": "Maintenance", + "accessories_modifications": "Accessories and Modifications", + "my_recent_providers": "My Recent Service Providers", + "my_active_ads": "My Active Ads", + "recommended_Ads": "Recommended Ads" } \ No newline at end of file diff --git a/lib/classes/app_state.dart b/lib/classes/app_state.dart index 32a5f71..964f7be 100644 --- a/lib/classes/app_state.dart +++ b/lib/classes/app_state.dart @@ -1,8 +1,7 @@ - import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:mc_common_app/models/post_params_model.dart'; import 'package:mc_common_app/models/user/user.dart'; - +import 'package:mc_common_app/utils/enums.dart'; class AppState { static final AppState _instance = AppState._internal(); @@ -17,17 +16,24 @@ class AppState { bool? get getIsLogged => isLogged; + AppType currentAppType = AppType.provider; + + void setAppType(AppType appType) { + currentAppType = appType; + } + User? _user = null; set setUser(v) => _user = v; - User get getUser => _user??User(); + User get getUser => _user ?? User(); PostParamsModel? _postParams; PostParamsModel? get postParamsObject => _postParams; Map get postParamsJson => _postParams?.toJson() ?? {}; + void setPostParamsModel(PostParamsModel _postParams) { this._postParams = _postParams; } @@ -37,5 +43,4 @@ class AppState { set setCurrentLocation(v) => currentLocation = v; LatLng get getCurrentLocation => currentLocation; - } diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index a2cef92..972c57c 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -4,53 +4,51 @@ import 'package:mc_common_app/generated/codegen_loader.g.dart'; class ApiConsts { // static String baseUrl = "http://10.200.204.20:2801/"; // Local 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"; - static String RefreshToken = baseUrlServices + "api/Account/RefreshToken"; - + 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"; + static String RefreshToken = "${baseUrlServices}api/Account/RefreshToken"; //User - static String Login_V1 = baseUrlServices + "api/Account/Login_V1"; - static String Login_V2_OTP = baseUrlServices + "api/Account/Login_V2_OTP"; - static String Login_V2_OTPVerify = baseUrlServices + "api/Account/Login_V2_OTPVerify"; - static String user = baseUrlServices + "api/User/"; - static String GetAllCountry = baseUrlServices + "api/Master/Country_Get"; - static String GetProviderRoles = baseUrlServices + "api/Master/RoleServiceProvider_Get"; - static String GetAllCities = baseUrlServices + "api/Master/City_Get"; - static String ForgetPasswordOTPRequest = baseUrlServices + "api/Account/ForgetPasswordOTPRequest"; - static String ForgetPasswordOTPCompare = baseUrlServices + "api/Account/ForgetPasswordOTPCompare"; - static String ForgetPassword = baseUrlServices + "api/Account/ForgetPassword"; - static String Login_Email_OTP = baseUrlServices + "api/Account/EmailVerify"; - static String Login_Email_OTPVerify = baseUrlServices + "api/Account/EmailVerifyOTPVerify"; - static String ChangePassword = baseUrlServices + "api/Account/ChangePassword"; - static String ChangeMobileNoOTPRequest = baseUrlServices + "api/Account/ChangeMobileNoOTPRequest"; - static String ChangeMobileNo = baseUrlServices + "api/Account/ChangeMobileNo"; - static String ChangeEmailOTPRequest = baseUrlServices + "api/Account/ChangeEmailOTPRequest"; - static String ChangeEmail = baseUrlServices + "api/Account/ChangeEmail"; - static String EmailVerify = baseUrlServices + "api/Account/EmailVerify"; - static String EmailVerifyOTPVerify = baseUrlServices + "api/Account/EmailVerifyOTPVerify"; - static String UpdateUserImage = baseUrlServices + "api/User_UpdateProfileImage"; - static String GetUserImage = baseUrlServices + "api/ProfileImage"; - + static String Login_V1 = "${baseUrlServices}api/Account/Login_V1"; + static String Login_V2_OTP = "${baseUrlServices}api/Account/Login_V2_OTP"; + static String Login_V2_OTPVerify = "${baseUrlServices}api/Account/Login_V2_OTPVerify"; + static String user = "${baseUrlServices}api/User/"; + static String GetAllCountry = "${baseUrlServices}api/Master/Country_Get"; + static String GetProviderRoles = "${baseUrlServices}api/Master/RoleServiceProvider_Get"; + static String GetAllCities = "${baseUrlServices}api/Master/City_Get"; + static String ForgetPasswordOTPRequest = "${baseUrlServices}api/Account/ForgetPasswordOTPRequest"; + static String ForgetPasswordOTPCompare = "${baseUrlServices}api/Account/ForgetPasswordOTPCompare"; + static String ForgetPassword = "${baseUrlServices}api/Account/ForgetPassword"; + static String Login_Email_OTP = "${baseUrlServices}api/Account/EmailVerify"; + static String Login_Email_OTPVerify = "${baseUrlServices}api/Account/EmailVerifyOTPVerify"; + static String ChangePassword = "${baseUrlServices}api/Account/ChangePassword"; + static String ChangeMobileNoOTPRequest = "${baseUrlServices}api/Account/ChangeMobileNoOTPRequest"; + static String ChangeMobileNo = "${baseUrlServices}api/Account/ChangeMobileNo"; + static String ChangeEmailOTPRequest = "${baseUrlServices}api/Account/ChangeEmailOTPRequest"; + static String ChangeEmail = "${baseUrlServices}api/Account/ChangeEmail"; + static String EmailVerify = "${baseUrlServices}api/Account/EmailVerify"; + static String EmailVerifyOTPVerify = "${baseUrlServices}api/Account/EmailVerifyOTPVerify"; + static String UpdateUserImage = "${baseUrlServices}api/User_UpdateProfileImage"; + static String GetUserImage = "${baseUrlServices}api/ProfileImage"; //Profile - static String GetProviderDocument = baseUrlServices + "api/ServiceProviders/ServiceProviderDocument_Get"; - static String ServiceProviderDocument_Update = baseUrlServices + "api/ServiceProviders/ServiceProviderDocument_Update"; + static String GetProviderDocument = "${baseUrlServices}api/ServiceProviders/ServiceProviderDocument_Get"; + static String ServiceProviderDocument_Update = "${baseUrlServices}api/ServiceProviders/ServiceProviderDocument_Update"; //Branch - static String getProviderBranch = baseUrlServices + "api/ServiceProviders/ServiceProviderBranch_Get"; - static String createProviderBranch = baseUrlServices + "api/ServiceProviders/ServiceProviderBranch_Create"; - static String updateProviderBranch = baseUrlServices + "api/ServiceProviders/ServiceProviderBranch_Update"; - static String ServiceProviderBranchGet = baseUrlServices + "api/ServiceProviders/ServiceProviderBranch_Get"; - static String ServiceCategory_Get = baseUrlServices + "api/Master/ServiceCategory_Get"; - static String Services_Get = baseUrlServices + "api/ServiceProviders/Services_Get"; - static String ServiceProviderService_Create = baseUrlServices + "api/ServiceProviders/ServiceProviderService_Create"; - static String ServiceProviderService_Update = baseUrlServices + "api/ServiceProviders/ServiceProviderService_Update"; - - static String ServiceProviderService_Get= baseUrlServices + "api/ServiceProviders/ServiceProviderService_Get"; - static String BranchesAndServices= baseUrlServices + "api/ServiceProviders/ServiceProviderDetail_Get"; + static String getProviderBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Get"; + static String createProviderBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Create"; + static String updateProviderBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Update"; + static String ServiceProviderBranchGet = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Get"; + static String ServiceCategory_Get = "${baseUrlServices}api/Master/ServiceCategory_Get"; + static String Services_Get = "${baseUrlServices}api/ServiceProviders/Services_Get"; + static String ServiceProviderService_Create = "${baseUrlServices}api/ServiceProviders/ServiceProviderService_Create"; + static String ServiceProviderService_Update = "${baseUrlServices}api/ServiceProviders/ServiceProviderService_Update"; + + static String ServiceProviderService_Get = "${baseUrlServices}api/ServiceProviders/ServiceProviderService_Get"; + static String BranchesAndServices = "${baseUrlServices}api/ServiceProviders/ServiceProviderDetail_Get"; } class GlobalConsts { @@ -65,42 +63,77 @@ class GlobalConsts { class MyAssets { - //Banner - static String carBanner = "assets/images/bn_car.jpeg"; - - - //NavBar Icons - static String homeIcon = "assets/icons/home_icon.svg"; - static String announcementIcon = "assets/icons/anouncement_icon.svg"; - static String dashboardDrawerIcon = "assets/icons/drawer_icon.svg"; - static String closeIcon = "assets/icons/close_icon.svg"; - static String appointmentsIcon = "assets/icons/appointments_icon.svg"; - static String providersIcon = "assets/icons/providers_icon.svg"; - static String miniClock = "assets/icons/mini_clock.svg"; - static String nextIcon = "assets/icons/next_icon.svg"; - static String settingsIcon = "assets/icons/settings_icon.svg"; - static String notificationsIcon = "assets/icons/notification_bell.svg"; - + static const String assetPath = "packages/mc_common_app/assets/"; + //JPEG + static String bnCar = "${assetPath}images/bn_car.jpeg"; + static String carBanner = "${assetPath}images/bn_car.jpeg"; + + //SVG + static String homeIcon = "${assetPath}icons/home_icon.svg"; + static String announcementIcon = "${assetPath}icons/anouncement_icon.svg"; + static String dashboardDrawerIcon = "${assetPath}icons/drawer_icon.svg"; + static String closeIcon = "${assetPath}icons/close_icon.svg"; + static String appointmentsIcon = "${assetPath}icons/appointments_icon.svg"; + static String providersIcon = "${assetPath}icons/providers_icon.svg"; + static String miniClock = "${assetPath}icons/mini_clock.svg"; + static String nextIcon = "${assetPath}icons/next_icon.svg"; + static String settingsIcon = "${assetPath}icons/settings_icon.svg"; + static String branchesIcon = "${assetPath}icons/branches_icon.svg"; + static String icAds = "${assetPath}icons/ic_ads.svg"; + static String icAppointments = "${assetPath}icons/ic_appointments.svg"; + static String icBranches = "${assetPath}icons/ic_branches.svg"; + static String icCloseAccount = "${assetPath}icons/ic_close_account.svg"; + static String icFace = "${assetPath}icons/ic_face.svg"; + static String icFingerprintSvg = "${assetPath}icons/ic_fingerprint.svg"; + static String icHome = "${assetPath}icons/ic_home.svg"; + static String icProvider = "${assetPath}icons/ic_provider.svg"; + static String icRequests = "${assetPath}icons/ic_requests.svg"; + static String icServices = "${assetPath}icons/ic_services.svg"; + static String icSettings = "${assetPath}icons/ic_settings.svg"; + static String icSmsSvg = "${assetPath}icons/ic_sms.svg"; + static String icWhatsAppSvg = "${assetPath}icons/ic_whatsapp.svg"; + static String maintenanceIcon = "${assetPath}icons/maintenance_icon.svg"; + static String modificationsIcon = "${assetPath}icons/modifications_icon.svg"; + static String notificationsBellIcon = "${assetPath}icons/notification_bell.svg"; + static String requestsIcon = "${assetPath}icons/requests_icon.svg"; + static String starIcon = "${assetPath}icons/star_icon.svg"; + static String bcIntro = "${assetPath}images/bc_intro.svg"; + static String bnLogo = "${assetPath}images/bn_logo.svg"; + static String icCar = "${assetPath}images/ic_car.svg"; + static String icEdit = "${assetPath}images/ic_edit.svg"; + static String icEmail = "${assetPath}images/ic_email.svg"; + static String icLock = "${assetPath}images/ic_lock.svg"; + static String icLogout = "${assetPath}images/ic_logout.svg"; + static String icMobile = "${assetPath}images/ic_mobile.svg"; + static String icNotes = "${assetPath}images/ic_notes.svg"; + static String icNotification = "${assetPath}images/ic_notification.svg"; + static String logo = "${assetPath}images/logo.svg"; + static String splashLogo = "${assetPath}images/splash_logo.svg"; + + //PNG + static String icWorldPng = "${assetPath}images/ic_world.png"; + static String bnIntroPng = "${assetPath}images/bn_Intro.png"; + static String icLogoWhitePng = "${assetPath}images/ic_logo_white.png"; + static String icEnginePng = "${assetPath}images/ic_engine.png"; + static String bnMapPng = "${assetPath}images/bn_map.png"; + static String icWhatsAppPng = "${assetPath}icons/ic_whatsapp.png"; + static String icSmsPng = "${assetPath}icons/ic_sms.png"; + static String icFingerprintPng = "${assetPath}icons/ic_fingerprint.png"; } -const String icons = "assets/icons/"; -const String categorySvgIcons = "assets/category/svg/"; -const String svgIcons = "assets/svg/"; RegExp numReg = RegExp(r".*[0-9].*"); RegExp letterReg = RegExp(r".*[A-Za-z].*"); - class MyLocales { static const List supportedLocales = [Locale('ar', 'SA'), Locale('en', 'US')]; static const Locale startLocale = Locale('en', 'US'); static const Locale fallBackLocale = Locale('en', 'US'); static const CodegenLoader assetLoader = CodegenLoader(); - static String assetsPath = "assets/langs"; + static String localesAssetPath = "${MyAssets.assetPath}langs"; } class MyFonts { - - static const poppinsFont = "Poppins"; + static const poppinsFont = "packages/mc_common_app/Poppins"; } diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart deleted file mode 100644 index 6dd9b28..0000000 --- a/lib/generated/codegen_loader.g.dart +++ /dev/null @@ -1,354 +0,0 @@ -// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart - -// ignore_for_file: prefer_single_quotes - -import 'dart:ui'; - -import 'package:easy_localization/easy_localization.dart' show AssetLoader; - -class CodegenLoader extends AssetLoader{ - const CodegenLoader(); - - @override - Future> load(String fullPath, Locale locale ) { - return Future.value(mapLocales[locale.toString()]); - } - - static const Map ar_SA = { - "firstTimeLogIn": "تسجيل الدخول لأول مره", - "signUp": "التسجيل", - "changeMobile": "تغيير رقم الجوال", - "notifications": "الاشعارات", - "general": "عام", - "defineLicences": "تحديد الرخص", - "dealershipSettings": "اعدادات البيع", - "changePassword": "تغيير كلمة المرور", - "retrievePassword": "استرجاع كلمة المرور", - "changeEmail": "تغيير الايميل", - "verify": "تحقق", - "verified": "تم التحقق", - "signOut": "تسجيل خروج", - "enterEmail": "ادخل الايميل", - "enterNewEmail": "ادخل ايميل جديد", - "enterCurrentPassword": "كلمة المرور الحاليه", - "enterNewPassword": "كلمة المرور الجديده", - "enterOldPassword": "كلمة المرور القديمه", - "confirm": "تأكيد", - "enterNewPhoneNumber": "رقم جوال جديد", - "completeProfile": "الملف الشخصي", - "continu": "استمرار", - "confirmPassword": "تأكيد كلمة المرور", - "createPassword": "انشاء كلمة مرور جديده", - "email": "ايميل", - "firstName": "الأسم الأول *", - "surname": "اسم العائله *", - "confirmPass": "تأكيد كلمة المرور *", - "createPass": "انشاء كلمة مرور جديده *", - "newPassword": " كلمة مرور جديده", - "forgetPassword": "نسيت كلمة المرور", - "forgetPasswordRecover": "نسيت كلمة المرور؟ استعادة", - "editAccount": "تعديل الحساب", - "change": "تغيير", - "verifyAccount": "التحقق من الحساب", - "login": "تسجيل دخول", - "welcomeMessage": "مرحبا", - "forgetPass": "نسيت كلمة المرور ؟", - "enterPhoneNumber": "رقم جوال ", - "phoneNumberVerified": "تم التحقق من الجوال", - "verifyNewPassword": "التحقق من كلمة المرور", - "EnterPass": "ادخل كلمة المرور", - "alreadySigned": " تم تسجيل الدخول", - "emailChangedSuccessfully": "تم تغيير الايميل بنجاح", - "passwordIsUpdated": "تم تحجيث كلمة المرور", - "passwordShouldContains": "كلمة المرور يجب ان تحتوي على رمز رقم حرف كبير حرف صغير", - " successfullyRegistered": "تم التسجيل بنجاح", - "pleaseEnterSamePassword": "ادخل كلمة مرور مطابقه", - "firstNameMandatory": "ادخل الأسم الأول ", - "surnameNameMandatory": "ادخل اسم العائله", - "passwordNameMandatory": "ادخل كلمة المرور", - "enterValidEmail": "ادخل ايميل صحيح", - "pleaseAcceptTerms": "يجب الموافقه على الشروط", - "emailVerified": "تم التحقق من الايميل بنجاح", - "selectMethod": "اختر", - "emailAddress": "ايميل", - "loginSelection": "اختر", - "selectCountryCode": "اختر رمز الدوله", - "selectProviderRole": "اختر نوع الخدمه", - "addPhoneNo": "اضف الهاتف", - "onlyCustomerApp": "نأسف هذا التطبيق فقط للعملاء", - "imageUploaded": "تم تحميل الصوره", - "fileLarger": "1KB حجم الملف اكبر من", - "account": "الحساب", - "edit": "تعديل", - "imageDeleted": "تم حذف الصوره", - "dashboard": "الصفحه الرئيسيه", - "termsOfService": "من خلال إنشاء حساب فإنك توافق على", - "userInformation": "معلومات المتسخدم", - "faceRecognition": "تحقق مع بصمة الوجه", - "fingerPrint": "تحقق مع بصمة الاصبع", - "whatsapp": "تحقق مع Whatsapp", - "SMS": "رسائل قصيره", - "selectRole": "حدد الدور", - "userRoleOrTitle": "عنوان المستخدم", - "codeSentToEmail": "تم ارسال الرمز للايميل", - "number": "موبايل", - "english": "English", - "title": "Hello", - "msg": "Hello {} in the {} world ", - "msg_named": "{} are written in the {lang} language", - "clickMe": "Click me", - "profile": { - "reset_password": { - "label": "Reset Password", - "username": "Username", - "password": "password" - } - }, - "clicked": { - "zero": "You clicked {} times!", - "one": "You clicked {} time!", - "two": "You clicked {} times!", - "few": "You clicked {} times!", - "many": "You clicked {} times!", - "other": "You clicked {} times!" - }, - "amount": { - "zero": "Your amount : {} ", - "one": "Your amount : {} ", - "two": "Your amount : {} ", - "few": "Your amount : {} ", - "many": "Your amount : {} ", - "other": "Your amount : {} " - }, - "gender": { - "male": "Hi man ;) ", - "female": "Hello girl :)", - "with_arg": { - "male": "Hi man ;) {}", - "female": "Hello girl :) {}" - } - }, - "reset_locale": "Reset Language", - "welcomeDes": "أنت مكان واحد لكل ما تحتاجه سيارتك", - "log_in": "تسجيل الدخول", - "send": "إرسال", - "phoneNumber": "رقم الهاتف", - "forgetPasswordQ": "نسيت كلمة المرور؟", - "recover": "استعادة", - "retrivePassword": "استرجع كلمة المرور بإحدى الطرق التالية", - "retriveOnPhone": "سوف نرسل الاختيار إلى رقم هاتفك المحمول المسجل", - "retriveOnEmail": "سوف نرسل الاختيار إلى عنوان بريدك الإلكتروني المسجل", - "enterPhoneForVerfication": "الرجاء إدخال رقم هاتفك وسنرسل لك رمز التحقق", - "welcomeBack": "مرحبًا بعودتك!!!", - "selectYourCountry": "اختر بلدك", - "chooseCountry": "اختر الدوله", - "terms": "بنود الخدمة وخصوصية السياسة", - "profileMsg": "أدخل التفاصيل أدناه وأكمل معلومات الملف الشخصي", - "save": "حفظ", - "insert_otp_code": "ادخل الرمز", - "type_code": "الرجاء كتابة الرمز الذي أرسلناه إلى", - "resend_code": "أعد إرسال الرمز", - "check_code": "التحقق من الشفرة", - "time_will_expire": "إعادة إرسال الرمز بتنسيق", - "sec": "ثانية", - "providers": "الموفرون", - "appointments": "تعيينات", - "home": "بيت", - "ads": "إعلانات", - "settings": "إعدادات", - "view_all": "مشاهدة الكل", - "my_active_Ads": "إعلاناتي النشطة", - "recommended_ads": "الإعلانات الموصى بها", - "upcoming_appointment": "الموعد القادم", - "my_service_providers": "مزودي الخدمة الجدد", - "appointment_details": "تفاصيل الموعد", - "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 en_US = { - "firstTimeLogIn": "First Time Log In", - "signUp": "Sign Up", - "changeMobile": "Change Mobile", - "notifications": "Notifications", - "general": "General", - "defineLicences": "Define Licences", - "dealershipSettings": "Dealership Settings", - "changePassword": "Change Password", - "retrievePassword": "Retrieve Password", - "changeEmail": "Change Email", - "verify": "Verify", - "verified": "Verified", - "signOut": "Sign Out", - "enterEmail": "Enter Email", - "enterNewEmail": "Enter New Email", - "enterNewPassword": "Enter New Password", - "enterCurrentPassword": "Enter Current Password", - "enterOldPassword": "Enter Old Password", - "confirm": "Confirm", - "completeProfile": "Complete Profile", - "enterNewPhoneNumber": "Enter New Phone Number", - "enterPhoneNumber": "Enter Phone Number", - "continu": "Continue", - "confirmPassword": "Confirm Password", - "createPassword": "Create Password", - "email": "Email", - "firstName": "First Name *", - "surname": "Surname *", - "confirmPass": "Confirm Password *", - "createPass": "Create Password *", - "newPassword": "New Password", - "forgetPassword": "Forget Password", - "forgetPasswordRecover": "Forget Password? Recover", - "editAccount": "Edit Account", - "change": "Change", - "verifyAccount": "Verify Account", - "login": "Log In", - "welcomeMessage": "Welcome Message", - "forgetPass": "Forget Password ?", - "phoneNumberVerified": "Phone Number Verified", - "verifyNewPassword": "Verify New Password", - "EnterPass": "Enter Password ?", - "alreadySigned": " Already Signed Up and Logged In", - "emailChangedSuccessfully": "Email is Changed Successfully", - "passwordIsUpdated": "Password is Updated", - "passwordShouldContains": "Password Should contains Character, Number, Capital and small letters,", - " successfullyRegistered": " Successfully Registered, Please login once,", - "pleaseEnterSamePassword": "Please enter same password", - "firstNameMandatory": "First name is mandatory", - "surnameNameMandatory": "Surname is mandatory", - "passwordNameMandatory": "Password is mandatory", - "enterValidEmail": "Enter Valid Email", - "pleaseAcceptTerms": "Please accept terms", - "emailVerified": "Email is verified successfully", - "selectMethod": "Select Method", - "emailAddress": "Email Address", - "loginSelection": "Login Selection", - "selectCountryCode": "Please select Country Code", - "selectProviderRole": "Please select Provider Role", - "addPhoneNo": "Please add Phone No", - "onlyCustomerApp": "Sorry, Only Customer's can log in this app", - "imageUploaded": "Image is uploaded", - "fileLarger": "File is larger then 1KB", - "account": "Account", - "edit": "EDIT", - "imageDeleted": "Image is Deleted", - "dashboard": "Dashboard/Main Page", - "termsOfService": "By creating an account you agree to our", - "userInformation": "User Information", - "faceRecognition": "Face Recognition", - "fingerPrint": "Finger Print", - "whatsapp": "With Whatsapp", - "SMS": "With SMS", - "selectRole": "Select Role", - "userRoleOrTitle": "User role or title", - "codeSentToEmail": "Code is sent to email", - "number": "Number", - "english": "عربي", - "title": "Hello", - "msg": "Hello {} in the {} world ", - "msg_named": "{} are written in the {lang} language", - "clickMe": "Click me", - "profile": { - "reset_password": { - "label": "Reset Password", - "username": "Username", - "password": "password" - } - }, - "clicked": { - "zero": "You clicked {} times!", - "one": "You clicked {} time!", - "two": "You clicked {} times!", - "few": "You clicked {} times!", - "many": "You clicked {} times!", - "other": "You clicked {} times!" - }, - "amount": { - "zero": "Your amount : {} ", - "one": "Your amount : {} ", - "two": "Your amount : {} ", - "few": "Your amount : {} ", - "many": "Your amount : {} ", - "other": "Your amount : {} " - }, - "gender": { - "male": "Hi man ;) ", - "female": "Hello girl :)", - "with_arg": { - "male": "Hi man ;) {}", - "female": "Hello girl :) {}" - } - }, - "reset_locale": "Reset Language", - "welcomeDes": "You one stop place all your car needs", - "log_in": "Log In", - "send": "Send", - "phoneNumber": "Phone Number", - "forgetPasswordQ": "Forget Password?", - "recover": "Recover", - "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", - "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", - "providers": "Providers", - "appointments": "Appointments", - "home": "Home", - "ads": "Ads", - "settings": "Settings", - "view_all": "view all", - "my_active_Ads": "My Active Ads", - "recommended_ads": "Recommended Ads", - "upcoming_appointment": "Upcoming Appointment", - "my_service_providers": "My Recent Service Providers", - "appointment_details": "Appointment Details", - "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> mapLocales = {"ar_SA": ar_SA, "en_US": en_US}; -} diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart deleted file mode 100644 index 8c87b09..0000000 --- a/lib/generated/locale_keys.g.dart +++ /dev/null @@ -1,149 +0,0 @@ -// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart - -abstract class LocaleKeys { - static const firstTimeLogIn = 'firstTimeLogIn'; - static const signUp = 'signUp'; - static const changeMobile = 'changeMobile'; - static const notifications = 'notifications'; - static const general = 'general'; - static const defineLicences = 'defineLicences'; - static const dealershipSettings = 'dealershipSettings'; - static const changePassword = 'changePassword'; - static const retrievePassword = 'retrievePassword'; - static const changeEmail = 'changeEmail'; - static const verify = 'verify'; - static const verified = 'verified'; - static const signOut = 'signOut'; - static const enterEmail = 'enterEmail'; - static const enterNewEmail = 'enterNewEmail'; - static const enterCurrentPassword = 'enterCurrentPassword'; - static const enterNewPassword = 'enterNewPassword'; - static const enterOldPassword = 'enterOldPassword'; - static const confirm = 'confirm'; - static const enterNewPhoneNumber = 'enterNewPhoneNumber'; - static const completeProfile = 'completeProfile'; - static const continu = 'continu'; - static const confirmPassword = 'confirmPassword'; - static const createPassword = 'createPassword'; - static const email = 'email'; - static const firstName = 'firstName'; - static const surname = 'surname'; - static const confirmPass = 'confirmPass'; - static const createPass = 'createPass'; - static const newPassword = 'newPassword'; - static const forgetPassword = 'forgetPassword'; - static const forgetPasswordRecover = 'forgetPasswordRecover'; - static const editAccount = 'editAccount'; - static const change = 'change'; - static const verifyAccount = 'verifyAccount'; - static const login = 'login'; - static const welcomeMessage = 'welcomeMessage'; - static const forgetPass = 'forgetPass'; - static const enterPhoneNumber = 'enterPhoneNumber'; - static const phoneNumberVerified = 'phoneNumberVerified'; - static const verifyNewPassword = 'verifyNewPassword'; - static const EnterPass = 'EnterPass'; - static const alreadySigned = 'alreadySigned'; - static const emailChangedSuccessfully = 'emailChangedSuccessfully'; - static const passwordIsUpdated = 'passwordIsUpdated'; - static const passwordShouldContains = 'passwordShouldContains'; - static const successfullyRegistered = ' successfullyRegistered'; - static const pleaseEnterSamePassword = 'pleaseEnterSamePassword'; - static const firstNameMandatory = 'firstNameMandatory'; - static const surnameNameMandatory = 'surnameNameMandatory'; - static const passwordNameMandatory = 'passwordNameMandatory'; - static const enterValidEmail = 'enterValidEmail'; - static const pleaseAcceptTerms = 'pleaseAcceptTerms'; - static const emailVerified = 'emailVerified'; - static const selectMethod = 'selectMethod'; - static const emailAddress = 'emailAddress'; - static const loginSelection = 'loginSelection'; - static const selectCountryCode = 'selectCountryCode'; - static const selectProviderRole = 'selectProviderRole'; - static const addPhoneNo = 'addPhoneNo'; - static const onlyCustomerApp = 'onlyCustomerApp'; - static const imageUploaded = 'imageUploaded'; - static const fileLarger = 'fileLarger'; - static const account = 'account'; - static const edit = 'edit'; - static const imageDeleted = 'imageDeleted'; - static const dashboard = 'dashboard'; - static const termsOfService = 'termsOfService'; - static const userInformation = 'userInformation'; - static const faceRecognition = 'faceRecognition'; - static const fingerPrint = 'fingerPrint'; - static const whatsapp = 'whatsapp'; - static const SMS = 'SMS'; - static const selectRole = 'selectRole'; - static const userRoleOrTitle = 'userRoleOrTitle'; - static const codeSentToEmail = 'codeSentToEmail'; - static const number = 'number'; - static const english = 'english'; - static const title = 'title'; - static const msg = 'msg'; - static const msg_named = 'msg_named'; - static const clickMe = 'clickMe'; - static const profile_reset_password_label = 'profile.reset_password.label'; - static const profile_reset_password_username = 'profile.reset_password.username'; - static const profile_reset_password_password = 'profile.reset_password.password'; - static const profile_reset_password = 'profile.reset_password'; - static const profile = 'profile'; - static const clicked = 'clicked'; - static const amount = 'amount'; - static const gender_with_arg = 'gender.with_arg'; - static const gender = 'gender'; - static const reset_locale = 'reset_locale'; - static const welcomeDes = 'welcomeDes'; - static const log_in = 'log_in'; - static const send = 'send'; - static const phoneNumber = 'phoneNumber'; - static const forgetPasswordQ = 'forgetPasswordQ'; - static const recover = 'recover'; - static const retrivePassword = 'retrivePassword'; - static const retriveOnPhone = 'retriveOnPhone'; - static const retriveOnEmail = 'retriveOnEmail'; - static const enterPhoneForVerfication = 'enterPhoneForVerfication'; - static const welcomeBack = 'welcomeBack'; - static const selectYourCountry = 'selectYourCountry'; - static const chooseCountry = 'chooseCountry'; - static const terms = 'terms'; - static const profileMsg = 'profileMsg'; - static const save = 'save'; - static const insert_otp_code = 'insert_otp_code'; - static const type_code = 'type_code'; - static const resend_code = 'resend_code'; - static const check_code = 'check_code'; - static const time_will_expire = 'time_will_expire'; - static const sec = 'sec'; - static const providers = 'providers'; - static const appointments = 'appointments'; - static const home = 'home'; - static const ads = 'ads'; - static const settings = 'settings'; - static const view_all = 'view_all'; - static const my_active_Ads = 'my_active_Ads'; - static const recommended_ads = 'recommended_ads'; - static const upcoming_appointment = 'upcoming_appointment'; - static const my_service_providers = 'my_service_providers'; - static const appointment_details = 'appointment_details'; - static const no_city_available = 'no_city_available'; - static const branch_created = 'branch_created'; - static const branch_updated = 'branch_updated'; - static const branch_deleted = 'branch_deleted'; - static const dashboard_main = 'dashboard_main'; - static const logo_brand = 'logo_brand'; - static const remove = 'remove'; - static const no_branch = 'no_branch'; - static const login_once = 'login_once'; - static const defineLicenese = 'defineLicenese'; - static const description = 'description'; - static const attachFile = 'attachFile'; - static const branchLocation = 'branchLocation'; - static const tapToEdit = 'tapToEdit'; - static const myServiceBranches = 'myServiceBranches'; - static const enter_licence_detail = 'enter_licence_detail'; - static const country = 'country'; - static const city = 'city'; - static const editServices = 'editServices'; - -} diff --git a/lib/main.dart b/lib/main.dart index 44fdfbb..f2d9ecf 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,17 +3,12 @@ import 'dart:io'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:mc_common_app/classes/consts.dart'; -import 'package:mc_common_app/classes/app_state.dart'; - import 'package:mc_common_app/theme/app_theme.dart'; import 'package:logger/logger.dart'; import 'package:provider/provider.dart'; import 'package:provider/single_child_widget.dart'; import 'package:sizer/sizer.dart'; -late AppState appState; - final navigatorKey = GlobalKey(); Logger logger = Logger( @@ -45,12 +40,12 @@ Future main() async { path: 'resources', // assetLoader: const CodegenLoader(), child: MultiProvider( - providers: [ + providers: const [ // ChangeNotifierProvider( // create: (_) => LoginProviderModel(), // ), ], - child: MyApp(), + child: const MyApp(), ), ), ); @@ -60,6 +55,8 @@ Future main() async { // flutter pub run easy_localization:generate -S resources -f keys -O lib/generated -o locale_keys.g.dart class MyApp extends StatelessWidget { + const MyApp({super.key}); + @override Widget build(BuildContext context) { return LayoutBuilder(builder: (context, constraints) { diff --git a/lib/theme/app_theme.dart b/lib/theme/app_theme.dart index ffe07b2..70a101b 100644 --- a/lib/theme/app_theme.dart +++ b/lib/theme/app_theme.dart @@ -1,15 +1,19 @@ import 'package:flutter/material.dart'; +import 'package:mc_common_app/classes/consts.dart'; import 'colors.dart'; class AppTheme { - static getTheme({required isArabic}) => ThemeData( - fontFamily: !isArabic ? "Poppins" : null, - primaryColor: primaryColor, - primaryTextTheme: const TextTheme( - titleLarge: TextStyle(color: Colors.white), - ), colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.orange).copyWith(background: Colors.white), - ); + static getTheme({required isArabic}) { + + return ThemeData( + fontFamily: !isArabic ? MyFonts.poppinsFont : null, + primaryColor: primaryColor, + primaryTextTheme: const TextTheme( + titleLarge: TextStyle(color: Colors.white), + ), colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.orange).copyWith(background: Colors.white), + ); + } } extension ExtendedRevoCheckTheme on TextTheme { diff --git a/lib/view_models/base_view_model.dart b/lib/view_models/base_view_model.dart index 030b322..7db1451 100644 --- a/lib/view_models/base_view_model.dart +++ b/lib/view_models/base_view_model.dart @@ -10,12 +10,6 @@ class BaseVM extends ChangeNotifier { String error = ""; - AppType currentAppType = AppType.provider; - - void setAppType(AppType appType) { - currentAppType = appType; - } - void setOnlyState(ViewState viewState) { _state = viewState; } diff --git a/lib/views/splash/splash_page.dart b/lib/views/splash/splash_page.dart index a8b7d67..e97cf7f 100644 --- a/lib/views/splash/splash_page.dart +++ b/lib/views/splash/splash_page.dart @@ -1,3 +1,4 @@ +import 'package:mc_common_app/classes/consts.dart'; import 'package:mc_common_app/config/routes.dart'; import 'package:mc_common_app/utils/navigator.dart'; import 'package:mc_common_app/utils/utils.dart'; @@ -19,13 +20,13 @@ class SplashPage extends StatelessWidget { Utils. mExp(1), Expanded( child: Image.asset( - "assets/images/ic_logo_white.png", + MyAssets.icLogoWhitePng, ), ), Expanded( flex: 10, child: Image.asset( - "assets/images/bn_car.jpeg", + MyAssets.bnCar, fit: BoxFit.cover, width: double.infinity, height: 00, @@ -34,7 +35,7 @@ class SplashPage extends StatelessWidget { Expanded( flex: 3, child: Image.asset( - "assets/images/ic_engine.png", + MyAssets.icEnginePng, ), ), Utils.mExp(1), diff --git a/lib/views/user/edit_account_page.dart b/lib/views/user/edit_account_page.dart index 91e42a7..d823792 100644 --- a/lib/views/user/edit_account_page.dart +++ b/lib/views/user/edit_account_page.dart @@ -1,4 +1,5 @@ import 'package:mc_common_app/classes/app_state.dart'; +import 'package:mc_common_app/classes/consts.dart'; import 'package:mc_common_app/config/routes.dart'; import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart'; @@ -40,7 +41,7 @@ class _EditAccountPageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ SvgPicture.asset( - "assets/images/ic_lock.svg", + MyAssets.icLock, color: MyColors.darkPrimaryColor, width: 16, ), @@ -102,7 +103,7 @@ class _EditAccountPageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ SvgPicture.asset( - "assets/images/ic_email.svg", + MyAssets.icEmail, color: MyColors.darkPrimaryColor, width: 16, ), diff --git a/lib/views/user/forget_password_method_page.dart b/lib/views/user/forget_password_method_page.dart index 1eed6c7..dafe053 100644 --- a/lib/views/user/forget_password_method_page.dart +++ b/lib/views/user/forget_password_method_page.dart @@ -45,7 +45,7 @@ class _ForgetPasswordMethodPageState extends State { await userVM.forgetPasswordOTPMethod(context, userToken: widget.userToken); }, title: LocaleKeys.SMS.tr(), - icon: icons + "ic_sms.svg", + icon: MyAssets.icSmsSvg, ), ), 20.width, @@ -56,7 +56,7 @@ class _ForgetPasswordMethodPageState extends State { await userVM.forgetPasswordOTPMethod(context, userToken: widget.userToken); }, title: LocaleKeys.whatsapp.tr(), - icon: icons + "ic_whatsapp.svg", + icon: MyAssets.icWhatsAppSvg, ), ), ], diff --git a/lib/views/user/login_method_selection_page.dart b/lib/views/user/login_method_selection_page.dart index 9eb3915..175655c 100644 --- a/lib/views/user/login_method_selection_page.dart +++ b/lib/views/user/login_method_selection_page.dart @@ -1,5 +1,7 @@ +import 'package:mc_common_app/classes/app_state.dart'; import 'package:mc_common_app/classes/consts.dart'; +import 'package:mc_common_app/config/dependencies.dart'; import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/generated/locale_keys.g.dart'; @@ -18,7 +20,8 @@ class LoginMethodSelectionPage extends StatelessWidget { @override Widget build(BuildContext context) { UserVM userVM = context.read(); - + AppState appState = injector.get(); + print("current: ${appState.currentAppType}"); return Scaffold( appBar: CustomAppBar( isRemoveBackButton: true, title: LocaleKeys.log_in.tr()), body: Container( @@ -37,20 +40,20 @@ class LoginMethodSelectionPage extends StatelessWidget { Expanded( child: ShowImageButton( onClick: () { - userVM.performBasicOtpLoginSelectionPage(context, userToken: userToken,appType: userVM.currentAppType); + userVM.performBasicOtpLoginSelectionPage(context, userToken: userToken,appType: appState.currentAppType); }, title: LocaleKeys.fingerPrint.tr(), - icon: icons + "ic_fingerprint.svg", + icon: MyAssets.icFingerprintSvg, ), ), 20.width, Expanded( child: ShowImageButton( onClick: () { - userVM.performBasicOtpLoginSelectionPage(context, userToken: userToken,appType: userVM.currentAppType); + userVM.performBasicOtpLoginSelectionPage(context, userToken: userToken,appType: appState.currentAppType); }, title: LocaleKeys.faceRecognition.tr(), - icon: icons + "ic_face.svg", + icon: MyAssets.icFace, ), ), ], @@ -61,10 +64,10 @@ class LoginMethodSelectionPage extends StatelessWidget { Expanded( child: ShowImageButton( onClick: () { - userVM.performBasicOtpLoginSelectionPage(context, userToken: userToken,appType: userVM.currentAppType); + userVM.performBasicOtpLoginSelectionPage(context, userToken: userToken,appType: appState.currentAppType); }, title: LocaleKeys.SMS.tr(), - icon: icons + "ic_sms.svg", + icon: MyAssets.icSmsSvg, ), ), 20.width, @@ -72,10 +75,10 @@ class LoginMethodSelectionPage extends StatelessWidget { child: ShowImageButton( onClick: () { // navigateWithName(context, AppRoutes.dashboard); - userVM.performBasicOtpLoginSelectionPage(context, userToken: userToken,appType: userVM.currentAppType); + userVM.performBasicOtpLoginSelectionPage(context, userToken: userToken,appType: appState.currentAppType); }, title: LocaleKeys.whatsapp.tr(), - icon: icons + "ic_whatsapp.svg", + icon: MyAssets.icWhatsAppSvg, ), ), ], diff --git a/lib/views/user/login_verification_page.dart b/lib/views/user/login_verification_page.dart index dd4dd61..68ad098 100644 --- a/lib/views/user/login_verification_page.dart +++ b/lib/views/user/login_verification_page.dart @@ -54,7 +54,7 @@ class _LoginVerificationPageState extends State { userVM.performBasicOtpLoginVerificationPage(context, userToken: userToken); }, title: LocaleKeys.fingerPrint.tr(), - icon: icons + "ic_fingerprint.png", + icon: MyAssets.icFingerprintSvg, ), ), 20.width, @@ -64,7 +64,7 @@ class _LoginVerificationPageState extends State { userVM.performBasicOtpLoginVerificationPage(context, userToken: userToken); }, title: LocaleKeys.faceRecognition.tr(), - icon: icons + "ic_face_id.png", + icon: MyAssets.icFace, ), ), ], @@ -78,7 +78,7 @@ class _LoginVerificationPageState extends State { userVM.performBasicOtpLoginVerificationPage(context, userToken: userToken); }, title: LocaleKeys.SMS.tr(), - icon: icons + "ic_sms.png", + icon: MyAssets.icSmsSvg, ), ), 20.width, @@ -88,7 +88,7 @@ class _LoginVerificationPageState extends State { userVM.performBasicOtpLoginVerificationPage(context, userToken: userToken); }, title: LocaleKeys.whatsapp.tr(), - icon: icons + "ic_whatsapp.png", + icon: MyAssets.icWhatsAppSvg, ), ), ], diff --git a/lib/views/user/login_verify_account_page.dart b/lib/views/user/login_verify_account_page.dart index 4f963af..5750db4 100644 --- a/lib/views/user/login_verify_account_page.dart +++ b/lib/views/user/login_verify_account_page.dart @@ -65,7 +65,7 @@ class LoginVerifyAccountPage extends StatelessWidget { // )); }, title: LocaleKeys.SMS.tr(), - icon: icons + "ic_sms.png", + icon: MyAssets.icSmsSvg, ), ), 20.width, @@ -94,7 +94,7 @@ class LoginVerifyAccountPage extends StatelessWidget { // )); }, title: LocaleKeys.whatsapp.tr(), - icon: icons + "ic_whatsapp.png", + icon: MyAssets.icWhatsAppSvg, ), ), ], diff --git a/lib/views/user/register_selection_page.dart b/lib/views/user/register_selection_page.dart index c76a956..7716fd5 100644 --- a/lib/views/user/register_selection_page.dart +++ b/lib/views/user/register_selection_page.dart @@ -1,3 +1,6 @@ +import 'package:mc_common_app/classes/app_state.dart'; +import 'package:mc_common_app/classes/consts.dart'; +import 'package:mc_common_app/config/dependencies.dart'; import 'package:mc_common_app/config/routes.dart'; import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart'; @@ -5,12 +8,10 @@ import 'package:mc_common_app/generated/locale_keys.g.dart'; import 'package:mc_common_app/utils/enums.dart'; import 'package:mc_common_app/utils/navigator.dart'; import 'package:mc_common_app/utils/utils.dart'; -import 'package:mc_common_app/view_models/user_view_model.dart'; import 'package:mc_common_app/widgets/show_fill_button.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:provider/provider.dart'; import '../../theme/colors.dart'; @@ -19,21 +20,21 @@ class RegisterSelectionPage extends StatelessWidget { @override Widget build(BuildContext context) { - UserVM userVM = Provider.of(context, listen: false); + AppState appState = injector.get(); return Scaffold( body: Container( width: double.infinity, height: double.infinity, - decoration: const BoxDecoration( + decoration: BoxDecoration( image: DecorationImage( - image: AssetImage("assets/images/bn_Intro.png"), + image: AssetImage(MyAssets.bnIntroPng), fit: BoxFit.cover, ), ), child: Column( children: [ Utils.mFlex(6), - SvgPicture.asset("assets/images/logo.svg"), + SvgPicture.asset(MyAssets.logo), Utils.mFlex(4), LocaleKeys.welcomeMessage.tr().toText( fontSize: 20, @@ -61,7 +62,7 @@ class RegisterSelectionPage extends StatelessWidget { isFlatButton: true, txtColor: Colors.black, onPressed: () { - if (userVM.currentAppType == AppType.customer) { + if (appState.currentAppType == AppType.customer) { navigateWithName(context, AppRoutes.registerCustomer); } else { navigateWithName(context, AppRoutes.registerProvider); diff --git a/lib/views/user/vertify_password_page.dart b/lib/views/user/vertify_password_page.dart index c67ce50..28a62f3 100644 --- a/lib/views/user/vertify_password_page.dart +++ b/lib/views/user/vertify_password_page.dart @@ -70,7 +70,7 @@ class VerifyPasswordPage extends StatelessWidget { )); }, title: LocaleKeys.SMS.tr(), - icon: icons + "ic_sms.png", + icon: MyAssets.icSmsSvg, ), ), 20.width, @@ -100,7 +100,7 @@ class VerifyPasswordPage extends StatelessWidget { )); }, title: LocaleKeys.whatsapp.tr(), - icon: icons + "ic_whatsapp.png", + icon: MyAssets.icWhatsAppSvg, ), ), ], diff --git a/lib/widgets/common_widgets/ad_widget.dart b/lib/widgets/common_widgets/ad_widget.dart index 4cf8920..07677ea 100644 --- a/lib/widgets/common_widgets/ad_widget.dart +++ b/lib/widgets/common_widgets/ad_widget.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:mc_common_app/classes/consts.dart'; import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/theme/colors.dart'; @@ -28,7 +29,7 @@ class AdWidget extends StatelessWidget { return Row( children: [ Image.asset( - "assets/images/bn_car.jpeg", + MyAssets.bnCar, width: 80, height: 80, fit: BoxFit.cover, diff --git a/lib/widgets/common_widgets/customer_appointment_slider_widget.dart b/lib/widgets/common_widgets/customer_appointment_slider_widget.dart index 93b0f94..16a100f 100644 --- a/lib/widgets/common_widgets/customer_appointment_slider_widget.dart +++ b/lib/widgets/common_widgets/customer_appointment_slider_widget.dart @@ -18,7 +18,7 @@ class CustomerAppointmentSliderWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - "assets/images/bn_car.jpeg", + MyAssets.bnCar, width: 56, height: 56, fit: BoxFit.fill, diff --git a/lib/widgets/common_widgets/my_service_provider.dart b/lib/widgets/common_widgets/my_service_provider.dart index 0f250fe..8881cfb 100644 --- a/lib/widgets/common_widgets/my_service_provider.dart +++ b/lib/widgets/common_widgets/my_service_provider.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:mc_common_app/classes/consts.dart'; import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/widgets/extensions/extensions_widget.dart'; @@ -22,7 +23,7 @@ class ServiceProviderWidget extends StatelessWidget { child: Column( children: [ Image.asset( - "assets/images/bn_car.jpeg", + MyAssets.bnCar, width: 80, height: 80, fit: BoxFit.cover, diff --git a/lib/widgets/common_widgets/provider_appointment_slider_widget.dart b/lib/widgets/common_widgets/provider_appointment_slider_widget.dart index 46f2053..da4da92 100644 --- a/lib/widgets/common_widgets/provider_appointment_slider_widget.dart +++ b/lib/widgets/common_widgets/provider_appointment_slider_widget.dart @@ -1,5 +1,7 @@ import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:mc_common_app/classes/consts.dart'; import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/theme/colors.dart'; @@ -57,9 +59,9 @@ class ProviderAppointmentSliderWidget extends StatelessWidget { Expanded( child: Column( children: [ - showServices("Maintenance"), + showServices("Maintenance", MyAssets.maintenanceIcon ), 2.height, - showServices("Accessories and Modification"), + showServices("Accessories and Modification", MyAssets.modificationsIcon,), ], ), ), @@ -77,7 +79,7 @@ class ProviderAppointmentSliderWidget extends StatelessWidget { Widget build(BuildContext context) { return CarouselSlider.builder( options: CarouselOptions( - height: 140, + height: 160, viewportFraction: 1.0, enlargeCenterPage: false, enableInfiniteScroll: false, @@ -93,14 +95,10 @@ class ProviderAppointmentSliderWidget extends StatelessWidget { ); } - Widget showServices(String title) { + Widget showServices(String title, String icon) { return Row( children: [ - const Icon( - Icons.ac_unit, - color: MyColors.primaryColor, - size: 18, - ), + SvgPicture.asset(icon), 8.width, title.toText( fontSize: 14, diff --git a/lib/widgets/extensions/extensions_widget.dart b/lib/widgets/extensions/extensions_widget.dart index 70dadf3..4cfcd1b 100644 --- a/lib/widgets/extensions/extensions_widget.dart +++ b/lib/widgets/extensions/extensions_widget.dart @@ -195,7 +195,7 @@ extension WidgetExt on Widget { Widget horPaddingMain() { return Padding( - padding: EdgeInsets.symmetric(horizontal: 21), + padding: const EdgeInsets.symmetric(horizontal: 21), child: this, ); } @@ -321,7 +321,7 @@ extension LocaleSetup on MultiProvider { fallbackLocale: MyLocales.fallBackLocale, startLocale: MyLocales.startLocale, assetLoader: MyLocales.assetLoader, - path: MyLocales.assetsPath, + path: MyLocales.localesAssetPath, child: this); } }