You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
car_common_app/lib/classes/consts.dart

208 lines
13 KiB
Dart

import 'package:flutter/cupertino.dart';
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";
//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";
//Profile
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";
//Appointment APIs
static String serviceProvidersAppointmentGet = "${baseUrlServices}api/ServiceProviders/ServiceProvidersAppointment_Get";
static String serviceCategoryGet = "${baseUrlServices}api/Master/ServiceCategory_Get";
static String serviceItemsGet = "${baseUrlServices}api/ServiceProviders/ServiceItem_Get";
//ServiceProvidersServiceID as params
// static String servicesGet = "${baseUrlServices}api/ServiceProviders/Services_Get";
//Advertisement APIs
static String vehicleTypeGet = "${baseUrlServices}api/ServiceProviders/VehicleType_Get";
static String vehicleModelGet = "${baseUrlServices}api/Master/VehicleModel_Get";
static String vehicleModelYearGet = "${baseUrlServices}api/Master/VehicleModelYear_Get";
static String vehicleColorGet = "${baseUrlServices}api/Master/VehicleColor_Get";
static String vehicleConditionGet = "${baseUrlServices}api/Master/VehicleCondition_Get";
static String vehicleCategoryGet = "${baseUrlServices}api/Master/VehicleCategory_Get";
static String vehicleMileageGet = "${baseUrlServices}api/Master/VehicleMileage_Get";
static String vehicleTransmissionGet = "${baseUrlServices}api/Master/VehicleTransmission_Get";
static String vehicleSellerTypeGet = "${baseUrlServices}api/Master/VehicleSellerType_Get";
static String vehicleDamagePartGet = "${baseUrlServices}api/ServiceProviders/VehicleDamagePart_Get";
static String vehicleCountryGet = "${baseUrlServices}api/Master/Country_Get";
static String vehicleCityGet = "${baseUrlServices}api/Master/City_Get";
static String vehicleDetailsMaster = "${baseUrlServices}api/Master";
static String vehicleAdsDurationGet = "${baseUrlServices}api/Advertisement/AdsDuration_Get";
static String vehicleAdsSpecialServicesGet = "${baseUrlServices}api/Common/SpecialService_Get";
static String vehicleAdsSingleStepCreate = "${baseUrlServices}api/Advertisement/AdsSingleStep_Create";
static String vehicleAdsGet = "${baseUrlServices}api/Advertisement/Ads_Get";
static String adsCarCheckupSPBranchScheduleSlotGet = "${baseUrlServices}api/Advertisement/AdsCarCheckupSPBranchScheduleSlot_Get";
static String adsPhotoOfficeAppointmentScheduleSlotGet = "${baseUrlServices}api/Advertisement/PhotoOfficeAppointmentScheduleSlot_Get";
// Payment
static String paymentWebViewUrl = "https://ms.hmg.com/pay/PaymentHome";
static String payForOrderDetailGet = "${baseUrlServices}api/Payment/PayFortOrderDetail_Get";
static List<String> closingUrls = ["PayFortResponse"];
}
class GlobalConsts {
static String isRememberMe = "remember_me";
static String email = "email";
static String password = "password";
static String bookmark = "bookmark";
static String fontZoomSize = "font_zoom_size";
static String welcomeVideoUrl = "welcomeVideoUrl";
static String doNotShowWelcomeVideo = "doNotShowWelcomeVideo";
static String demandAmountError = "Demand Amount Cannot be Empty";
static String vehicleVinError = "Vehicle VIN Cannot be Empty";
static String vehicleTitleError = "Vehicle Title Cannot be Empty";
static String warrantyError = "Warranty Duration Cannot be Empty";
static String vehicleDescError = "Vehicle Description Cannot be Empty";
static String attachImageError = "You must add at least 3 images";
static String attachDamagePartImage = "Please add part image";
static String adDurationDateError = "Ad Duration start date cannot be empty";
static String adReservablePriceErrorConst = "Ad Reservable price cannot be empty";
static String reserveAdPriceInfo =
"Some dummy description to explain the following concept. This price will be for 24 hours and if a user cancels the reservations before 24 hours then the amount will be automatically refunded to the buyer.";
}
class MyAssets {
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}icons/ic_edit.svg";
static String icEmail = "${assetPath}icons/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";
static String searchIcon = "${assetPath}icons/search_icon.svg";
static String miniClockDark = "${assetPath}icons/mini_clock_dark.svg";
static String scheduleAppointmentIcon = "${assetPath}icons/schedule_appointment_icon.svg";
static String creditCardIcon = "${assetPath}icons/credit_card_icon.svg";
static String reservedConeIcon = "${assetPath}icons/reserved_cone_icon.svg";
static String attachmentIcon = "${assetPath}icons/attachment_icon.svg";
static String carIcon = "${assetPath}icons/car_icon.svg";
static String clockIcon = "${assetPath}icons/clock_icon.svg";
static String closeWithOrangeBg = "${assetPath}icons/close_with_orange_bg.svg";
static String reviewIcon = "${assetPath}icons/review_icon.svg";
static String carHitIcon = "${assetPath}icons/car_hit_icon.svg";
static String icGroupStar = "${assetPath}icons/ic_group_star.svg";
static String icPassword = "${assetPath}icons/ic_password.svg";
static String icPhoneNumber = "${assetPath}icons/ic_phone_number.svg";
static String icStar = "${assetPath}icons/ic_star.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";
static String applePayPng = "${assetPath}icons/payments/apple_pay.png";
static String installmentsPng = "${assetPath}icons/payments/installments.png";
static String madaPng = "${assetPath}icons/payments/mada.png";
static String mastercardPng = "${assetPath}icons/payments/mastercard.png";
static String tamaraArPng = "${assetPath}icons/payments/tamara_ar.png";
static String tamaraEngPng = "${assetPath}icons/payments/tamara_en.png";
static String visaPng = "${assetPath}icons/payments/visa.png";
}
RegExp numReg = RegExp(r".*[0-9].*");
RegExp letterReg = RegExp(r".*[A-Za-z].*");
class MyLocales {
static const List<Locale> 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 localesAssetPath = "${MyAssets.assetPath}langs";
}
class MyFonts {
static const poppinsFont = "packages/mc_common_app/Poppins";
}