fonts fixes & changes

master_new_changes
Aamir.Muhammad 2 years ago
parent e7fa2bfac8
commit 8fc14ee2bc

@ -591,6 +591,10 @@
"providerHasNoBranches": "هذا المزود ليس لديه فروع حتى الآن.", "providerHasNoBranches": "هذا المزود ليس لديه فروع حتى الآن.",
"totalBranches": "إجمالي الفروع", "totalBranches": "إجمالي الفروع",
"memberSince": "عضو منذ", "memberSince": "عضو منذ",
"reserved": "محجوز" "reserved": "محجوز",
"delete": "يمسح",
"deleteBranchConfirmation": "هل تريد حذف الفرع؟",
"deleteBranchConfirmationMessage": "سيتم حذف فرعك بشكل دائم ولن تتمكن من التراجع عن هذا الإجراء"
} }

@ -592,6 +592,8 @@
"providerHasNoBranches": "This Provider has no branches yet.", "providerHasNoBranches": "This Provider has no branches yet.",
"totalBranches": "Total Branches", "totalBranches": "Total Branches",
"memberSince": "Member Since", "memberSince": "Member Since",
"reserved": "Reserved" "reserved": "Reserved",
"delete": "Delete",
"deleteBranchConfirmation": "Do you want to delete the Branch?",
"deleteBranchConfirmationMessage": "Your branch will be permanently deleted and you cannot undo this action"
} }

@ -42,6 +42,7 @@ class ApiConsts {
static String getProviderBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Get"; static String getProviderBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Get";
static String createProviderBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Create"; static String createProviderBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Create";
static String updateProviderBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Update"; static String updateProviderBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Update";
static String deleteProviderBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Delete";
static String serviceProviderBranchGet = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Get"; static String serviceProviderBranchGet = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Get";
static String serviceCategoryGet = "${baseUrlServices}api/Master/ServiceCategory_Get"; static String serviceCategoryGet = "${baseUrlServices}api/Master/ServiceCategory_Get";
static String servicesGet = "${baseUrlServices}api/ServiceProviders/Services_Get"; static String servicesGet = "${baseUrlServices}api/ServiceProviders/Services_Get";
@ -286,7 +287,7 @@ class MyAssets {
static String visaPng = "${assetPath}icons/payments/visa.png"; static String visaPng = "${assetPath}icons/payments/visa.png";
static String whatsAppIcon = "${assetPath}icons/whatsapp_icon.svg"; static String whatsAppIcon = "${assetPath}icons/whatsapp_icon.svg";
static String arrowRight = "${assetPath}icons/ic_arrow_right.svg"; static const String arrowRight = "${assetPath}icons/ic_arrow_right.svg";
} }
RegExp numReg = RegExp(r".*[0-9].*"); RegExp numReg = RegExp(r".*[0-9].*");

@ -607,7 +607,10 @@ class CodegenLoader extends AssetLoader{
"providerHasNoBranches": "هذا المزود ليس لديه فروع حتى الآن.", "providerHasNoBranches": "هذا المزود ليس لديه فروع حتى الآن.",
"totalBranches": "إجمالي الفروع", "totalBranches": "إجمالي الفروع",
"memberSince": "عضو منذ", "memberSince": "عضو منذ",
"reserved": "محجوز" "reserved": "محجوز",
"delete": "يمسح",
"deleteBranchConfirmation": "هل تريد حذف الفرع؟",
"deleteBranchConfirmationMessage": "سيتم حذف فرعك بشكل دائم ولن تتمكن من التراجع عن هذا الإجراء"
}; };
static const Map<String,dynamic> en_US = { static const Map<String,dynamic> en_US = {
"firstTimeLogIn": "First Time Log In", "firstTimeLogIn": "First Time Log In",
@ -1203,7 +1206,10 @@ static const Map<String,dynamic> en_US = {
"providerHasNoBranches": "This Provider has no branches yet.", "providerHasNoBranches": "This Provider has no branches yet.",
"totalBranches": "Total Branches", "totalBranches": "Total Branches",
"memberSince": "Member Since", "memberSince": "Member Since",
"reserved": "Reserved" "reserved": "Reserved",
"delete": "Delete",
"deleteBranchConfirmation": "Do you want to delete the Branch?",
"deleteBranchConfirmationMessage": "Your branch will be permanently deleted and you cannot undo this action"
}; };
static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US}; static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US};
} }

@ -571,5 +571,8 @@ abstract class LocaleKeys {
static const totalBranches = 'totalBranches'; static const totalBranches = 'totalBranches';
static const memberSince = 'memberSince'; static const memberSince = 'memberSince';
static const reserved = 'reserved'; static const reserved = 'reserved';
static const delete = 'delete';
static const deleteBranchConfirmation = 'deleteBranchConfirmation';
static const deleteBranchConfirmationMessage = 'deleteBranchConfirmationMessage';
} }

@ -188,7 +188,9 @@ class BranchRepoImp implements BranchRepo {
}; };
String? token = AppState().getUser.data?.accessToken; String? token = AppState().getUser.data?.accessToken;
debugPrint(token); debugPrint(token);
return await injector.get<ApiClient>().getJsonForObject((json) => Document.fromJson(json), ApiConsts.fetProviderDocument, queryParameters: queryParameters, token: AppState().getUser.data!.accessToken ?? ""); return await injector
.get<ApiClient>()
.getJsonForObject((json) => Document.fromJson(json), ApiConsts.fetProviderDocument, queryParameters: queryParameters, token: AppState().getUser.data!.accessToken ?? "");
} }
@override @override
@ -196,7 +198,14 @@ class BranchRepoImp implements BranchRepo {
List<Map<String, dynamic>> map = []; List<Map<String, dynamic>> map = [];
for (int i = 0; i < documents!.length; i++) { for (int i = 0; i < documents!.length; i++) {
if (documents[i].document != null) { if (documents[i].document != null) {
var postParams = {"id": documents[i].id, "serviceProviderID": documents[i].serviceProviderId, "documentID": documents[i].documentId, "documentExt": documents[i].fileExt, "documentImage": documents[i].document, "isActive": true}; var postParams = {
"id": documents[i].id,
"serviceProviderID": documents[i].serviceProviderId,
"documentID": documents[i].documentId,
"documentExt": documents[i].fileExt,
"documentImage": documents[i].document,
"isActive": true
};
map.add(postParams); map.add(postParams);
} }
} }
@ -276,10 +285,9 @@ class BranchRepoImp implements BranchRepo {
Future<GenericRespModel> deleteBranch({required int branchId}) async { Future<GenericRespModel> deleteBranch({required int branchId}) async {
var postParams = { var postParams = {
"id": branchId, "id": branchId,
"isActive": false,
}; };
String t = AppState().getUser.data!.accessToken ?? ""; String t = AppState().getUser.data!.accessToken ?? "";
return await apiClient.postJsonForObject((json) => GenericRespModel.fromJson(json), ApiConsts.updateProviderBranch, postParams, token: t); return await apiClient.postJsonForObject((json) => GenericRespModel.fromJson(json), ApiConsts.deleteProviderBranch, postParams, token: t);
} }
@override @override
@ -393,7 +401,8 @@ class BranchRepoImp implements BranchRepo {
@override @override
Future<ProviderProfileModel> getBranchAndServicesByProviderId(int providerId) async { Future<ProviderProfileModel> getBranchAndServicesByProviderId(int providerId) async {
var postParams = {"serviceProviderID": providerId.toString()}; var postParams = {"serviceProviderID": providerId.toString()};
GenericRespModel adsGenericModel = await apiClient.getJsonForObject((json) => GenericRespModel.fromJson(json), ApiConsts.branchesAndServices, token: appState.getUser.data!.accessToken, queryParameters: postParams); GenericRespModel adsGenericModel =
await apiClient.getJsonForObject((json) => GenericRespModel.fromJson(json), ApiConsts.branchesAndServices, token: appState.getUser.data!.accessToken, queryParameters: postParams);
return ProviderProfileModel.fromJson(adsGenericModel.data); return ProviderProfileModel.fromJson(adsGenericModel.data);
} }
@ -435,7 +444,6 @@ class BranchRepoImp implements BranchRepo {
"Latitude": latitude.toString(), "Latitude": latitude.toString(),
"Longitude": longitude.toString(), "Longitude": longitude.toString(),
"Status": "3", "Status": "3",
}; };
GenericRespModel adsGenericModel = await apiClient.getJsonForObject( GenericRespModel adsGenericModel = await apiClient.getJsonForObject(

@ -304,6 +304,7 @@ class Utils {
child: text.toText( child: text.toText(
fontSize: 10, fontSize: 10,
color: textColor, color: textColor,
letterSpacing: -0.50
)); ));
} }

@ -259,10 +259,10 @@ class ServiceVM extends BaseVM {
DropValue( DropValue(
element.id ?? 0, element.id ?? 0,
((element.categoryName!.isEmpty ((element.categoryName!.isEmpty
? "N/A" ? "N/A"
: countryCode == "SA" : countryCode == "SA"
? element.categoryNameN ? element.categoryNameN
: element.categoryName) ?? : element.categoryName) ??
"N/A"), "N/A"),
"", "",
), ),
@ -406,7 +406,9 @@ class ServiceVM extends BaseVM {
File file = File(imageModel.filePath!); File file = File(imageModel.filePath!);
List<int> imageBytes = await file.readAsBytes(); List<int> imageBytes = await file.readAsBytes();
String image = base64Encode(imageBytes); String image = base64Encode(imageBytes);
String fileName = file.path.split('/').last; String fileName = file.path
.split('/')
.last;
branchPostingImages = BranchPostingImages( branchPostingImages = BranchPostingImages(
imageName: fileName, imageName: fileName,
imageStr: image, imageStr: image,
@ -536,13 +538,10 @@ class ServiceVM extends BaseVM {
Future<void> onDeleteBranchPressed({required BuildContext context, required int branchID}) async { Future<void> onDeleteBranchPressed({required BuildContext context, required int branchID}) async {
try { try {
Utils.showLoading(context); Utils.showLoading(context);
GenericRespModel res = await branchRepo.deleteBranch(branchId: branchID); GenericRespModel res = await branchRepo.deleteBranch(branchId: branchID);
Utils.hideLoading(context); Utils.hideLoading(context);
if (res.messageStatus == 1) { if (res.messageStatus == 1) {
Utils.showToast(LocaleKeys.branch_deleted.tr()); Utils.showToast(LocaleKeys.branch_deleted.tr());
pop(context);
pop(context);
getBranchAndServices(); getBranchAndServices();
} else { } else {
Utils.showToast(res.message ?? ""); Utils.showToast(res.message ?? "");

@ -1,8 +1,6 @@
import 'package:carousel_slider/carousel_slider.dart'; import 'package:carousel_slider/carousel_slider.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/generated/locale_keys.g.dart';
import 'package:mc_common_app/models/advertisment_models/ad_details_model.dart'; import 'package:mc_common_app/models/advertisment_models/ad_details_model.dart';
import 'package:mc_common_app/theme/colors.dart'; import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart'; import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
@ -19,7 +17,7 @@ class ImagesCorouselWidget extends StatefulWidget {
class _CarouselWithIndicatorState extends State<ImagesCorouselWidget> { class _CarouselWithIndicatorState extends State<ImagesCorouselWidget> {
int _current = 0; int _current = 0;
final CarouselController _controller = CarouselController(); CarouselSliderController _controller = CarouselSliderController();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -27,23 +27,26 @@ class CommonAppointmentSliderWidget extends StatelessWidget {
Widget getCarouselSliderWidget(AppType appType, AppointmentsVM appointmentsVM) { Widget getCarouselSliderWidget(AppType appType, AppointmentsVM appointmentsVM) {
return CarouselSlider.builder( return CarouselSlider.builder(
options: CarouselOptions( options: CarouselOptions(
height: appType == AppType.provider ? 121 : 140, height: appType == AppType.provider ? 121 : 96,
viewportFraction: 0.99999, // Todo: Dont do anything viewportFraction: 1,
pageSnapping: true,
enlargeCenterPage: false, enlargeCenterPage: false,
enableInfiniteScroll: false, enableInfiniteScroll: false,
), ),
itemCount: appointmentsVM.myUpComingAppointments.length, itemCount: appointmentsVM.myUpComingAppointments.length,
itemBuilder: (BuildContext context, int itemIndex, int pageViewIndex) => BuildAppointmentContainerForCustomer( itemBuilder: (BuildContext context, int itemIndex, int pageViewIndex) =>
isForProvider: appType == AppType.provider, BuildAppointmentContainerForCustomer(
appointmentListModel: appointmentsVM.myUpComingAppointments[itemIndex], isForProvider: appType == AppType.provider,
onTapped: () { isForCustomerHome: true,
if (appType == AppType.provider) { appointmentListModel: appointmentsVM.myUpComingAppointments[itemIndex],
onAppointmentClick!(appointmentsVM.myUpComingAppointments[itemIndex]); onTapped: () {
} else { if (appType == AppType.provider) {
navigateWithName(context, AppRoutes.appointmentDetailView, arguments: appointmentsVM.myUpComingAppointments[itemIndex]); onAppointmentClick!(appointmentsVM.myUpComingAppointments[itemIndex]);
} } else {
}, navigateWithName(context, AppRoutes.appointmentDetailView, arguments: appointmentsVM.myUpComingAppointments[itemIndex]);
), }
},
),
); );
} }
@ -142,10 +145,11 @@ class CommonAppointmentSliderWidget extends StatelessWidget {
class BuildAppointmentContainerForCustomer extends StatelessWidget { class BuildAppointmentContainerForCustomer extends StatelessWidget {
final bool isForProvider; final bool isForProvider;
final bool isForCustomerHome;
final AppointmentListModel? appointmentListModel; final AppointmentListModel? appointmentListModel;
final Function()? onTapped; final Function()? onTapped;
const BuildAppointmentContainerForCustomer({Key? key, this.isForProvider = false, this.onTapped, required this.appointmentListModel}) : super(key: key); const BuildAppointmentContainerForCustomer({Key? key, this.isForProvider = false, this.onTapped, required this.appointmentListModel, this.isForCustomerHome = false}) : super(key: key);
Widget showServices(String title, String icon, {bool isMoreText = false}) { Widget showServices(String title, String icon, {bool isMoreText = false}) {
return Row( return Row(
@ -181,7 +185,7 @@ class BuildAppointmentContainerForCustomer extends StatelessWidget {
List<Widget> servicesList = List.generate( List<Widget> servicesList = List.generate(
2, 2,
(index) => showServices(appointmentListModel.appointmentServicesList![index].providerServiceDescription, MyAssets.modificationsIcon), (index) => showServices(appointmentListModel.appointmentServicesList![index].providerServiceDescription, MyAssets.modificationsIcon),
); );
if (appointmentListModel.appointmentServicesList!.length > 1) { if (appointmentListModel.appointmentServicesList!.length > 1) {
@ -204,22 +208,26 @@ class BuildAppointmentContainerForCustomer extends StatelessWidget {
isForProvider // need to be updated through backend isForProvider // need to be updated through backend
? SizedBox() ? SizedBox()
: Image.asset( : Image.asset(
MyAssets.bnCar, MyAssets.bnCar,
width: 46, width: isForCustomerHome ? 46 : 77,
height: 46, height: isForCustomerHome ? 46 : 113,
fit: BoxFit.cover, fit: BoxFit.cover,
), ).toCircle(
borderRadius: isForCustomerHome ? 100 : 0,
),
8.width, 8.width,
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
(AppState().currentAppType == AppType.provider ? appointmentListModel!.branchName ?? "" : appointmentListModel!.branchName ?? "") AppState().currentAppType == AppType.provider ? (AppState().currentAppType == AppType.provider ? appointmentListModel!.branchName ?? "" : appointmentListModel!.branchName ?? "")
.toText(color: MyColors.greyColor, fontSize: 12, letterSpacing: 0, height: 19 / 12), .toText(color: MyColors.greyColor, fontSize: 12, letterSpacing: 0, height: 19 / 12) : SizedBox(),
(AppState().currentAppType == AppType.provider ? appointmentListModel!.customerName ?? "" : appointmentListModel!.branchName ?? "")
.toText(color: MyColors.black, fontSize: 16, letterSpacing: -0.64, height: 24 / 16), (AppState().currentAppType == AppType.provider ? appointmentListModel!.providerName ?? "" : appointmentListModel!.branchName ?? "")
Row( .toText(color: MyColors.black, fontSize: 16, letterSpacing: -0.64, height: 24 / 16)
, Row(
children: [ children: [
!isForProvider ? MyAssets.miniClock.buildSvg(height: 12) : SizedBox(), !isForProvider ? MyAssets.miniClock.buildSvg(height: 12) : SizedBox(),
2.width, 2.width,
@ -230,45 +238,45 @@ class BuildAppointmentContainerForCustomer extends StatelessWidget {
8.height, 8.height,
!isForProvider !isForProvider
? Row( ? Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
LocaleKeys.appointment_details.tr().toText( LocaleKeys.appointment_details.tr().toText(
color: MyColors.primaryColor, color: MyColors.primaryColor,
isUnderLine: true, isUnderLine: true,
fontSize: 14, fontSize: 14,
letterSpacing: -0.56, letterSpacing: -0.56,
), ),
SvgPicture.asset( SvgPicture.asset(
MyAssets.arrowRight, MyAssets.arrowRight,
height: 9.69, height: 9.69,
width: 13, width: 13,
), ),
], ],
) )
: Row( : Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Expanded( Expanded(
child: Column( child: Column(
children: buildServicesFromAppointment(appointmentListModel: appointmentListModel!), children: buildServicesFromAppointment(appointmentListModel: appointmentListModel!),
),
),
//ic_arrow_right.svg
SvgPicture.asset(
MyAssets.arrowRight,
height: 9.69,
width: 13,
),
],
), ),
),
//ic_arrow_right.svg
SvgPicture.asset(
MyAssets.arrowRight,
height: 9.69,
width: 13,
),
],
),
], ],
), ),
), ),
], ],
).onPress(onTapped!).toWhiteContainer( ).onPress(onTapped!).toWhiteContainer(
width: double.infinity, width: double.infinity,
allPading: 12, allPading: 12,
); );
} }
} }

@ -72,6 +72,7 @@ class AdsFragment extends StatelessWidget {
child: ShowFillButton( child: ShowFillButton(
isFilled: adVM.isExploreAdsTapped, isFilled: adVM.isExploreAdsTapped,
maxHeight: 55, maxHeight: 55,
fontSize: 15,
title: LocaleKeys.exploreAds.tr(), title: LocaleKeys.exploreAds.tr(),
txtColor: adVM.isExploreAdsTapped ? MyColors.white : MyColors.darkTextColor, txtColor: adVM.isExploreAdsTapped ? MyColors.white : MyColors.darkTextColor,
onPressed: () { onPressed: () {
@ -90,6 +91,7 @@ class AdsFragment extends StatelessWidget {
isFilled: !adVM.isExploreAdsTapped, isFilled: !adVM.isExploreAdsTapped,
txtColor: !adVM.isExploreAdsTapped ? MyColors.white : MyColors.darkTextColor, txtColor: !adVM.isExploreAdsTapped ? MyColors.white : MyColors.darkTextColor,
maxHeight: 55, maxHeight: 55,
fontSize: 15,
title: LocaleKeys.myAds.tr(), title: LocaleKeys.myAds.tr(),
onPressed: () { onPressed: () {
adVM.updateIsExploreAds(false); adVM.updateIsExploreAds(false);

@ -23,6 +23,7 @@ class MyRequestsFragment extends StatelessWidget {
appBar: CustomAppBar( appBar: CustomAppBar(
title: LocaleKeys.myRequests.tr(), title: LocaleKeys.myRequests.tr(),
isRemoveBackButton: true, isRemoveBackButton: true,
), ),
body: Container( body: Container(
color: MyColors.backgroundColor, color: MyColors.backgroundColor,

@ -3,6 +3,8 @@
import 'dart:developer'; import 'dart:developer';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mc_common_app/classes/consts.dart';
import 'package:mc_common_app/generated/locale_keys.g.dart'; import 'package:mc_common_app/generated/locale_keys.g.dart';
import 'package:mc_common_app/utils/enums.dart'; import 'package:mc_common_app/utils/enums.dart';
import 'package:mc_common_app/view_models/chat_view_model.dart'; import 'package:mc_common_app/view_models/chat_view_model.dart';
@ -40,7 +42,7 @@ class RequestItem extends StatelessWidget {
children: [ children: [
Utils.statusContainerChip(text: request.requestStatusName, chipColor: Utils.getChipColorByRequestStatus(request.requestStatus)), Utils.statusContainerChip(text: request.requestStatusName, chipColor: Utils.getChipColorByRequestStatus(request.requestStatus)),
6.height, 6.height,
"${request.brand} ${request.model}".toText(fontSize: 16, isBold: true), "${request.brand} ${request.model}".toText(fontSize: 16, letterSpacing: -0.64),
showItem("${LocaleKeys.model.tr()}:", "${request.year}"), showItem("${LocaleKeys.model.tr()}:", "${request.year}"),
showItem("${LocaleKeys.customerName.tr()}:", request.customerName), showItem("${LocaleKeys.customerName.tr()}:", request.customerName),
], ],
@ -54,21 +56,20 @@ class RequestItem extends StatelessWidget {
Center( Center(
child: "${request.offerCount}".toText( child: "${request.offerCount}".toText(
color: Colors.white, color: Colors.white,
isBold: true, fontSize: 10,
fontSize: 12,
), ),
).toContainer( ).toContainer(
backgroundColor: MyColors.redColor, backgroundColor: MyColors.redColor,
borderRadius: 100, borderRadius: 100,
paddingAll: 1, paddingAll: 1,
width: 25, width: 20,
height: 25, height: 20,
), ),
], ],
2.height, 2.height,
request.cityName.toText(color: MyColors.lightTextColor), request.cityName.toText(color: MyColors.lightTextColor, letterSpacing: -0.4, fontSize: 10),
if (request.createdOn != null) ...[ if (request.createdOn != null) ...[
DateTime.parse(request.createdOn!).getTimeAgo().toText(color: MyColors.lightTextColor), DateTime.parse(request.createdOn!).getTimeAgo().toText(color: MyColors.lightTextColor, letterSpacing: -0.4, fontSize: 10),
], ],
], ],
) )
@ -84,20 +85,22 @@ class RequestItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
request.price.toInt().toString().toText( request.price.toInt().toString().toText(
fontSize: 20, fontSize: 19,
color: Colors.black, color: MyColors.darkTextColor,
isBold: true, isBold: true,
), letterSpacing: -1.16
),
2.width, 2.width,
LocaleKeys.sar.tr().toText(color: MyColors.lightTextColor, fontSize: 10).paddingOnly(bottom: 3), LocaleKeys.sar.tr().toText(color: MyColors.lightTextColor, fontSize: 10, letterSpacing: -0.4).paddingOnly(bottom: 3),
], ],
), ),
request.requestStatus == RequestStatus.submitted request.requestStatus == RequestStatus.submitted
? const Icon( ? SvgPicture.asset(
Icons.arrow_forward, MyAssets.arrowRight,
color: MyColors.darkIconColor, height: 9.69,
size: 18, width: 13,
) )
: const SizedBox() : const SizedBox()
], ],
), ),
@ -124,9 +127,9 @@ class RequestItem extends StatelessWidget {
return Row( return Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
title.toText(color: MyColors.lightTextColor), title.toText(color: MyColors.lightTextColor, letterSpacing: -0.48),
3.width, 3.width,
Flexible(child: value.toText(isBold: true, overflow: TextOverflow.ellipsis )), Flexible(child: value.toText(isBold: true, overflow: TextOverflow.ellipsis)),
], ],
); );
} }

@ -75,7 +75,7 @@ class CircleCheckBoxWithTitle extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
title.toText(fontSize: 14, isBold: false), title.toText(fontSize: 14,),
], ],
), ),
), ),

@ -13,6 +13,7 @@ import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
class CustomAppBar extends StatelessWidget implements PreferredSizeWidget { class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
final Color? backgroundColor; final Color? backgroundColor;
final double? elevation; final double? elevation;
final double? toolbarHeight;
final String? title; final String? title;
final Color? titleColor; final Color? titleColor;
final bool? isTitleCenter; final bool? isTitleCenter;
@ -35,6 +36,7 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
this.actions, this.actions,
this.backIconColor, this.backIconColor,
this.elevation, this.elevation,
this.toolbarHeight,
this.isTitleCenter, this.isTitleCenter,
this.titleColor, this.titleColor,
this.onTap, this.onTap,
@ -44,7 +46,6 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// print("User Image URL == ${AppState().getUser.data!.userInfo!.userImageUrl} ============");
return Column( return Column(
children: [ children: [
AppBar( AppBar(
@ -53,82 +54,84 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
backgroundColor: backgroundColor ?? Colors.white, backgroundColor: backgroundColor ?? Colors.white,
elevation: elevation ?? 0, elevation: elevation ?? 0,
centerTitle: isTitleCenter ?? true, centerTitle: isTitleCenter ?? true,
scrolledUnderElevation: 0,
toolbarHeight: toolbarHeight,
leading: isDrawerEnabled leading: isDrawerEnabled
? InkWell( ? InkWell(
onTap: onTap, onTap: onTap,
child: Row( child: Row(
children: [ children: [
profileImageUrl.isEmpty && AppState().getUser.data!.userInfo!.userLocalImage != null profileImageUrl.isEmpty && AppState().getUser.data!.userInfo!.userLocalImage != null
? Image.file( ? Image.file(
AppState().getUser.data!.userInfo!.userLocalImage!, AppState().getUser.data!.userInfo!.userLocalImage!,
width: 34, width: 34,
height: 34, height: 34,
fit: BoxFit.fill, fit: BoxFit.fill,
).toCircle(borderRadius: 100) ).toCircle(borderRadius: 100)
: profileImageUrl.isEmpty && AppState().getUser.data!.userInfo!.userImageUrl != null : profileImageUrl.isEmpty && AppState().getUser.data!.userInfo!.userImageUrl != null
? CachedNetworkImage( ? CachedNetworkImage(
imageUrl: AppState().getUser.data!.userInfo!.userImageUrl, imageUrl: AppState().getUser.data!.userInfo!.userImageUrl,
imageBuilder: (context, imageProvider) => Container( imageBuilder: (context, imageProvider) =>
decoration: BoxDecoration( Container(
image: DecorationImage( decoration: BoxDecoration(
image: imageProvider, image: DecorationImage(
fit: BoxFit.cover, image: imageProvider,
), fit: BoxFit.cover,
), ),
), ),
placeholder: (context, url) => const Center(child: CircularProgressIndicator()), ),
errorWidget: (context, url, error) => const Icon(Icons.supervised_user_circle_outlined), placeholder: (context, url) => const Center(child: CircularProgressIndicator()),
fadeInCurve: Curves.easeIn, errorWidget: (context, url, error) => const Icon(Icons.supervised_user_circle_outlined),
width: 34, fadeInCurve: Curves.easeIn,
height: 34, width: 34,
fit: BoxFit.fill, height: 34,
fadeInDuration: const Duration(milliseconds: 1000), fit: BoxFit.fill,
useOldImageOnUrlChange: false) fadeInDuration: const Duration(milliseconds: 1000),
.toCircle(borderRadius: 100) useOldImageOnUrlChange: false)
: Image.asset( .toCircle(borderRadius: 100)
MyAssets.carBanner, : Image.asset(
width: 34, MyAssets.carBanner,
height: 34, width: 34,
fit: BoxFit.fill, height: 34,
).toCircle(borderRadius: 100), fit: BoxFit.fill,
10.width, ).toCircle(borderRadius: 100),
SvgPicture.asset(MyAssets.dashboardDrawerIcon), 10.width,
], SvgPicture.asset(MyAssets.dashboardDrawerIcon),
).paddingOnly(left: 21), ],
) ).paddingOnly(left: 21),
)
: isRemoveBackButton : isRemoveBackButton
? null ? null
: Row( : Row(
children: [ children: [
21.width, 21.width,
const Icon(Icons.arrow_back_ios, color: Colors.black, size: 16) const Icon(Icons.arrow_back_ios, color: Colors.black, size: 16)
.toContainer( .toContainer(
padding: const EdgeInsets.only(left: 5), padding: const EdgeInsets.only(left: 5),
borderRadius: 100, borderRadius: 100,
borderColor: MyColors.lightGreyEFColor, borderColor: MyColors.lightGreyEFColor,
isEnabledBorder: true, isEnabledBorder: true,
height: 40, height: 40,
width: 40, width: 40,
) )
.onPress(() { .onPress(() {
if (onBackButtonTapped != null) { if (onBackButtonTapped != null) {
onBackButtonTapped!(); onBackButtonTapped!();
} else { } else {
Navigator.pop(context); Navigator.pop(context);
} }
}), }),
], ],
), ),
iconTheme: IconThemeData( iconTheme: IconThemeData(
color: backIconColor ?? Colors.black, //change your color here color: backIconColor ?? Colors.black, //change your color here
), ),
actions: actions, actions: actions,
title: (title ?? "").toText(fontSize: 20, isBold: true), title: (title ?? "").toText(fontSize: 20),
), ),
if (backgroundColor == null) if (backgroundColor == null)
const Divider( const Divider(
thickness: 1, thickness: 1,
// color: MyColors.lightGreyEFColor,
height: 1) height: 1)
], ],
); );

@ -48,6 +48,7 @@ class FiltersList extends StatelessWidget {
), ),
child: filterList[index].title.toText( child: filterList[index].title.toText(
fontSize: 12, fontSize: 12,
letterSpacing: -0.14,
color: color:
filterList[index].isSelected ? MyColors.white : null, filterList[index].isSelected ? MyColors.white : null,
), ),

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mc_common_app/classes/consts.dart';
import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/theme/colors.dart'; import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/utils/utils.dart'; import 'package:mc_common_app/utils/utils.dart';
@ -67,8 +68,8 @@ class _DropdownFieldState extends State<DropdownField> {
iconEnabledColor: borderColor, iconEnabledColor: borderColor,
iconDisabledColor: borderColor, iconDisabledColor: borderColor,
isExpanded: true, isExpanded: true,
style: TextStyle(color: borderColor, fontFamily: 'Poppins', fontSize: 13.sp), style: TextStyle(color: borderColor, fontSize: 15, ),
hint: (widget.hint ?? "").toText(color: borderColor, fontSize: 13.sp), hint: (widget.hint ?? "").toText(color: borderColor, fontSize: 15,),
underline: Container(height: 0), underline: Container(height: 0),
onChanged: (DropValue? newValue) { onChanged: (DropValue? newValue) {
setState(() { setState(() {
@ -81,7 +82,7 @@ class _DropdownFieldState extends State<DropdownField> {
return DropdownMenuItem<DropValue>( return DropdownMenuItem<DropValue>(
value: value, value: value,
enabled: value.isEnabled ?? true, enabled: value.isEnabled ?? true,
child: value.value.toText(fontSize: 13.sp, color: value.isEnabled == false ? Colors.black38 : null), child: value.value.toText(fontSize: 15, color: value.isEnabled == false ? MyColors.darkTextColor : null, fontWeight: MyFonts.Medium),
); );
}, },
).toList(), ).toList(),

@ -84,12 +84,12 @@ extension ContainerExt on Widget {
boxShadow: !isShadowEnabled boxShadow: !isShadowEnabled
? null ? null
: [ : [
BoxShadow( BoxShadow(
color: const Color(0xff000000).withOpacity(.05), color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26, blurRadius: 26,
offset: const Offset(0, -3), offset: const Offset(0, -3),
), ),
], ],
), ),
padding: padding ?? EdgeInsets.all(paddingAll), padding: padding ?? EdgeInsets.all(paddingAll),
margin: margin ?? EdgeInsets.all(marginAll), margin: margin ?? EdgeInsets.all(marginAll),
@ -365,10 +365,14 @@ extension BuildSVG on String? {
if (imageChunk == null) { if (imageChunk == null) {
return child!; return child!;
} }
return const Center( return SizedBox(
child: CircularProgressIndicator( height: height,
strokeWidth: 0.5, width: width,
color: MyColors.darkPrimaryColor, child: const Center(
child: CircularProgressIndicator(
strokeWidth: 0.5,
color: MyColors.darkPrimaryColor,
),
), ),
); );
}, },
@ -382,7 +386,8 @@ extension BuildSVG on String? {
extension LocaleSetup on MultiProvider { extension LocaleSetup on MultiProvider {
Widget setupLocale() { Widget setupLocale() {
return EasyLocalization(supportedLocales: MyLocales.supportedLocales, return EasyLocalization(
supportedLocales: MyLocales.supportedLocales,
fallbackLocale: MyLocales.fallBackLocale, fallbackLocale: MyLocales.fallBackLocale,
startLocale: MyLocales.startLocale, startLocale: MyLocales.startLocale,
assetLoader: MyLocales.assetLoader, assetLoader: MyLocales.assetLoader,

@ -0,0 +1,28 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mc_common_app/classes/consts.dart';
extension RowWithArrowExtension on Row {
Row withArrow({
required bool isArrowEnabled,
String arrowAssetPath = MyAssets.arrowRight,
double arrowHeight = 9.69,
double arrowWidth = 13.0,
Color color = Colors.black,
}) {
return Row(
mainAxisAlignment: this.mainAxisAlignment,
crossAxisAlignment: this.crossAxisAlignment,
children: [
...this.children,
if (isArrowEnabled)
SvgPicture.asset(
arrowAssetPath,
height: arrowHeight,
width: arrowWidth,
color: color,
),
],
);
}
}

@ -1,4 +1,5 @@
import 'package:flutter/material.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/int_extensions.dart';
import 'package:mc_common_app/theme/colors.dart'; import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/widgets/dropdown/dropdow_field.dart'; import 'package:mc_common_app/widgets/dropdown/dropdow_field.dart';
@ -31,7 +32,10 @@ class _RoleTypeTabState extends State<RoleTypeTab> {
}); });
}, },
child: Container( child: Container(
width: widget.width ?? (MediaQuery.of(context).size.width / 2) - 30, width: widget.width ?? (MediaQuery
.of(context)
.size
.width / 2) - 30,
height: 50, height: 50,
decoration: BoxDecoration( decoration: BoxDecoration(
color: widget.selectedIndex == index ? MyColors.darkPrimaryColor : Colors.grey[200], color: widget.selectedIndex == index ? MyColors.darkPrimaryColor : Colors.grey[200],
@ -43,14 +47,20 @@ class _RoleTypeTabState extends State<RoleTypeTab> {
child: Center( child: Center(
child: Text( child: Text(
(widget.dropList[index].value) == "ServiceProvider_Dealership" || (widget.dropList[index].value) == "ServiceProvider_Individual" (widget.dropList[index].value) == "ServiceProvider_Dealership" || (widget.dropList[index].value) == "ServiceProvider_Individual"
? "${widget.dropList[index].value.split("_").first}\n${widget.dropList[index].value.split("_").last}" ? "${widget.dropList[index].value
.split("_")
.first}\n${widget.dropList[index].value
.split("_")
.last}"
: widget.dropList[index].value, : widget.dropList[index].value,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: widget.selectedIndex == index ? MyColors.white : Colors.black, color: widget.selectedIndex == index ? MyColors.white : MyColors.darkTextColor,
fontSize: 15, fontSize: 15,
height: 1 fontFamily: 'Poppins',
height: 23 / 15,
fontWeight: MyFonts.Medium
), ),
), ),

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:mc_common_app/classes/consts.dart';
import 'package:mc_common_app/extensions/int_extensions.dart'; import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/theme/colors.dart'; import 'package:mc_common_app/theme/colors.dart';
@ -89,7 +90,7 @@ class TxtField extends StatelessWidget {
borderRadius: const BorderRadius.all(Radius.circular(0)), borderRadius: const BorderRadius.all(Radius.circular(0)),
), ),
child: TextField( child: TextField(
style: const TextStyle(color: MyColors.darkTextColor), style: const TextStyle(color: MyColors.darkTextColor, fontSize: 15, fontWeight: MyFonts.Medium),
textInputAction: isSearchBar ? TextInputAction.search : null, textInputAction: isSearchBar ? TextInputAction.search : null,
keyboardType: keyboardType, keyboardType: keyboardType,
autofocus: false, autofocus: false,
@ -126,8 +127,8 @@ class TxtField extends StatelessWidget {
) )
: postfixWidget, : postfixWidget,
prefixIcon: prefixData != null ? Icon(prefixData, color: borderColor) : preFixWidget, prefixIcon: prefixData != null ? Icon(prefixData, color: borderColor) : preFixWidget,
labelStyle: TextStyle(color: borderColor, fontSize: 13.sp), labelStyle: TextStyle(color: borderColor, fontSize: 15, fontWeight: MyFonts.Medium),
hintStyle: TextStyle(color: borderColor, fontSize: 10.sp), hintStyle: TextStyle(color: borderColor, fontSize: 15, fontWeight: MyFonts.Medium),
hintText: hint ?? "", hintText: hint ?? "",
contentPadding: prefixData == null contentPadding: prefixData == null
? EdgeInsets.only( ? EdgeInsets.only(

@ -32,7 +32,7 @@ dependencies:
cached_network_image: any cached_network_image: any
url_launcher: ^6.1.14 url_launcher: ^6.1.14
badges: ^3.0.2 badges: ^3.0.2
carousel_slider: ^4.2.1 carousel_slider: 5.0.0
dropdown_button2: ^2.0.0 dropdown_button2: ^2.0.0
flutter_inappwebview: ^5.7.2+3 flutter_inappwebview: ^5.7.2+3
country_code_picker: ^3.0.0 country_code_picker: ^3.0.0

Loading…
Cancel
Save