fonts fixes & changes

aamir_dev
Aamir.Muhammad 2 months ago
parent e7fa2bfac8
commit 8fc14ee2bc

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

@ -592,6 +592,8 @@
"providerHasNoBranches": "This Provider has no branches yet.",
"totalBranches": "Total Branches",
"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 createProviderBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderBranch_Create";
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 serviceCategoryGet = "${baseUrlServices}api/Master/ServiceCategory_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 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].*");

@ -607,7 +607,10 @@ class CodegenLoader extends AssetLoader{
"providerHasNoBranches": "هذا المزود ليس لديه فروع حتى الآن.",
"totalBranches": "إجمالي الفروع",
"memberSince": "عضو منذ",
"reserved": "محجوز"
"reserved": "محجوز",
"delete": "يمسح",
"deleteBranchConfirmation": "هل تريد حذف الفرع؟",
"deleteBranchConfirmationMessage": "سيتم حذف فرعك بشكل دائم ولن تتمكن من التراجع عن هذا الإجراء"
};
static const Map<String,dynamic> en_US = {
"firstTimeLogIn": "First Time Log In",
@ -1203,7 +1206,10 @@ static const Map<String,dynamic> en_US = {
"providerHasNoBranches": "This Provider has no branches yet.",
"totalBranches": "Total Branches",
"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};
}

@ -571,5 +571,8 @@ abstract class LocaleKeys {
static const totalBranches = 'totalBranches';
static const memberSince = 'memberSince';
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;
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
@ -196,7 +198,14 @@ class BranchRepoImp implements BranchRepo {
List<Map<String, dynamic>> map = [];
for (int i = 0; i < documents!.length; i++) {
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);
}
}
@ -276,10 +285,9 @@ class BranchRepoImp implements BranchRepo {
Future<GenericRespModel> deleteBranch({required int branchId}) async {
var postParams = {
"id": branchId,
"isActive": false,
};
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
@ -393,7 +401,8 @@ class BranchRepoImp implements BranchRepo {
@override
Future<ProviderProfileModel> getBranchAndServicesByProviderId(int providerId) async {
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);
}
@ -435,7 +444,6 @@ class BranchRepoImp implements BranchRepo {
"Latitude": latitude.toString(),
"Longitude": longitude.toString(),
"Status": "3",
};
GenericRespModel adsGenericModel = await apiClient.getJsonForObject(

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

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

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

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

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

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

@ -3,6 +3,8 @@
import 'dart:developer';
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/utils/enums.dart';
import 'package:mc_common_app/view_models/chat_view_model.dart';
@ -40,7 +42,7 @@ class RequestItem extends StatelessWidget {
children: [
Utils.statusContainerChip(text: request.requestStatusName, chipColor: Utils.getChipColorByRequestStatus(request.requestStatus)),
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.customerName.tr()}:", request.customerName),
],
@ -54,21 +56,20 @@ class RequestItem extends StatelessWidget {
Center(
child: "${request.offerCount}".toText(
color: Colors.white,
isBold: true,
fontSize: 12,
fontSize: 10,
),
).toContainer(
backgroundColor: MyColors.redColor,
borderRadius: 100,
paddingAll: 1,
width: 25,
height: 25,
width: 20,
height: 20,
),
],
2.height,
request.cityName.toText(color: MyColors.lightTextColor),
request.cityName.toText(color: MyColors.lightTextColor, letterSpacing: -0.4, fontSize: 10),
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,
children: [
request.price.toInt().toString().toText(
fontSize: 20,
color: Colors.black,
isBold: true,
),
fontSize: 19,
color: MyColors.darkTextColor,
isBold: true,
letterSpacing: -1.16
),
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
? const Icon(
Icons.arrow_forward,
color: MyColors.darkIconColor,
size: 18,
)
? SvgPicture.asset(
MyAssets.arrowRight,
height: 9.69,
width: 13,
)
: const SizedBox()
],
),
@ -124,9 +127,9 @@ class RequestItem extends StatelessWidget {
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
title.toText(color: MyColors.lightTextColor),
title.toText(color: MyColors.lightTextColor, letterSpacing: -0.48),
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,
mainAxisAlignment: MainAxisAlignment.start,
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 {
final Color? backgroundColor;
final double? elevation;
final double? toolbarHeight;
final String? title;
final Color? titleColor;
final bool? isTitleCenter;
@ -35,6 +36,7 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
this.actions,
this.backIconColor,
this.elevation,
this.toolbarHeight,
this.isTitleCenter,
this.titleColor,
this.onTap,
@ -44,7 +46,6 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
@override
Widget build(BuildContext context) {
// print("User Image URL == ${AppState().getUser.data!.userInfo!.userImageUrl} ============");
return Column(
children: [
AppBar(
@ -53,82 +54,84 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
backgroundColor: backgroundColor ?? Colors.white,
elevation: elevation ?? 0,
centerTitle: isTitleCenter ?? true,
scrolledUnderElevation: 0,
toolbarHeight: toolbarHeight,
leading: isDrawerEnabled
? InkWell(
onTap: onTap,
child: Row(
children: [
profileImageUrl.isEmpty && AppState().getUser.data!.userInfo!.userLocalImage != null
? Image.file(
AppState().getUser.data!.userInfo!.userLocalImage!,
width: 34,
height: 34,
fit: BoxFit.fill,
).toCircle(borderRadius: 100)
: profileImageUrl.isEmpty && AppState().getUser.data!.userInfo!.userImageUrl != null
? CachedNetworkImage(
imageUrl: AppState().getUser.data!.userInfo!.userImageUrl,
imageBuilder: (context, imageProvider) => Container(
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover,
),
),
),
placeholder: (context, url) => const Center(child: CircularProgressIndicator()),
errorWidget: (context, url, error) => const Icon(Icons.supervised_user_circle_outlined),
fadeInCurve: Curves.easeIn,
width: 34,
height: 34,
fit: BoxFit.fill,
fadeInDuration: const Duration(milliseconds: 1000),
useOldImageOnUrlChange: false)
.toCircle(borderRadius: 100)
: Image.asset(
MyAssets.carBanner,
width: 34,
height: 34,
fit: BoxFit.fill,
).toCircle(borderRadius: 100),
10.width,
SvgPicture.asset(MyAssets.dashboardDrawerIcon),
],
).paddingOnly(left: 21),
)
onTap: onTap,
child: Row(
children: [
profileImageUrl.isEmpty && AppState().getUser.data!.userInfo!.userLocalImage != null
? Image.file(
AppState().getUser.data!.userInfo!.userLocalImage!,
width: 34,
height: 34,
fit: BoxFit.fill,
).toCircle(borderRadius: 100)
: profileImageUrl.isEmpty && AppState().getUser.data!.userInfo!.userImageUrl != null
? CachedNetworkImage(
imageUrl: AppState().getUser.data!.userInfo!.userImageUrl,
imageBuilder: (context, imageProvider) =>
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover,
),
),
),
placeholder: (context, url) => const Center(child: CircularProgressIndicator()),
errorWidget: (context, url, error) => const Icon(Icons.supervised_user_circle_outlined),
fadeInCurve: Curves.easeIn,
width: 34,
height: 34,
fit: BoxFit.fill,
fadeInDuration: const Duration(milliseconds: 1000),
useOldImageOnUrlChange: false)
.toCircle(borderRadius: 100)
: Image.asset(
MyAssets.carBanner,
width: 34,
height: 34,
fit: BoxFit.fill,
).toCircle(borderRadius: 100),
10.width,
SvgPicture.asset(MyAssets.dashboardDrawerIcon),
],
).paddingOnly(left: 21),
)
: isRemoveBackButton
? null
: Row(
children: [
21.width,
const Icon(Icons.arrow_back_ios, color: Colors.black, size: 16)
.toContainer(
padding: const EdgeInsets.only(left: 5),
borderRadius: 100,
borderColor: MyColors.lightGreyEFColor,
isEnabledBorder: true,
height: 40,
width: 40,
)
.onPress(() {
if (onBackButtonTapped != null) {
onBackButtonTapped!();
} else {
Navigator.pop(context);
}
}),
],
),
? null
: Row(
children: [
21.width,
const Icon(Icons.arrow_back_ios, color: Colors.black, size: 16)
.toContainer(
padding: const EdgeInsets.only(left: 5),
borderRadius: 100,
borderColor: MyColors.lightGreyEFColor,
isEnabledBorder: true,
height: 40,
width: 40,
)
.onPress(() {
if (onBackButtonTapped != null) {
onBackButtonTapped!();
} else {
Navigator.pop(context);
}
}),
],
),
iconTheme: IconThemeData(
color: backIconColor ?? Colors.black, //change your color here
),
actions: actions,
title: (title ?? "").toText(fontSize: 20, isBold: true),
title: (title ?? "").toText(fontSize: 20),
),
if (backgroundColor == null)
const Divider(
thickness: 1,
// color: MyColors.lightGreyEFColor,
height: 1)
],
);

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

@ -1,4 +1,5 @@
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/theme/colors.dart';
import 'package:mc_common_app/utils/utils.dart';
@ -67,8 +68,8 @@ class _DropdownFieldState extends State<DropdownField> {
iconEnabledColor: borderColor,
iconDisabledColor: borderColor,
isExpanded: true,
style: TextStyle(color: borderColor, fontFamily: 'Poppins', fontSize: 13.sp),
hint: (widget.hint ?? "").toText(color: borderColor, fontSize: 13.sp),
style: TextStyle(color: borderColor, fontSize: 15, ),
hint: (widget.hint ?? "").toText(color: borderColor, fontSize: 15,),
underline: Container(height: 0),
onChanged: (DropValue? newValue) {
setState(() {
@ -81,7 +82,7 @@ class _DropdownFieldState extends State<DropdownField> {
return DropdownMenuItem<DropValue>(
value: value,
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(),

@ -84,12 +84,12 @@ extension ContainerExt on Widget {
boxShadow: !isShadowEnabled
? null
: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
),
padding: padding ?? EdgeInsets.all(paddingAll),
margin: margin ?? EdgeInsets.all(marginAll),
@ -365,10 +365,14 @@ extension BuildSVG on String? {
if (imageChunk == null) {
return child!;
}
return const Center(
child: CircularProgressIndicator(
strokeWidth: 0.5,
color: MyColors.darkPrimaryColor,
return SizedBox(
height: height,
width: width,
child: const Center(
child: CircularProgressIndicator(
strokeWidth: 0.5,
color: MyColors.darkPrimaryColor,
),
),
);
},
@ -382,7 +386,8 @@ extension BuildSVG on String? {
extension LocaleSetup on MultiProvider {
Widget setupLocale() {
return EasyLocalization(supportedLocales: MyLocales.supportedLocales,
return EasyLocalization(
supportedLocales: MyLocales.supportedLocales,
fallbackLocale: MyLocales.fallBackLocale,
startLocale: MyLocales.startLocale,
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:mc_common_app/classes/consts.dart';
import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/widgets/dropdown/dropdow_field.dart';
@ -31,7 +32,10 @@ class _RoleTypeTabState extends State<RoleTypeTab> {
});
},
child: Container(
width: widget.width ?? (MediaQuery.of(context).size.width / 2) - 30,
width: widget.width ?? (MediaQuery
.of(context)
.size
.width / 2) - 30,
height: 50,
decoration: BoxDecoration(
color: widget.selectedIndex == index ? MyColors.darkPrimaryColor : Colors.grey[200],
@ -43,14 +47,20 @@ class _RoleTypeTabState extends State<RoleTypeTab> {
child: Center(
child: Text(
(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,
textAlign: TextAlign.center,
style: TextStyle(
color: widget.selectedIndex == index ? MyColors.white : Colors.black,
fontSize: 15,
height: 1
color: widget.selectedIndex == index ? MyColors.white : MyColors.darkTextColor,
fontSize: 15,
fontFamily: 'Poppins',
height: 23 / 15,
fontWeight: MyFonts.Medium
),
),

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

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

Loading…
Cancel
Save