Merge branch 'aamir_dev' into faiz_development_common

# Conflicts:
#	lib/models/provider_branches_models/branch_detail_model.dart
#	lib/views/advertisement/components/ads_list_widget.dart
#	lib/widgets/extensions/extensions_widget.dart
master_new_changes
Faiz Hashmi 2 years ago
commit e7fa2bfac8

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="9.688" viewBox="0 0 13 9.688">
<g id="Group" transform="translate(6 17.688) rotate(180)">
<path id="Vector" d="M13,4.844a.781.781,0,0,1-.781.781H2.674L5.414,8.352a.781.781,0,0,1-1.1,1.108L.23,5.4h0a.782.782,0,0,1,0-1.106h0L4.312.227a.781.781,0,0,1,1.1,1.108L2.674,4.062h9.545A.781.781,0,0,1,13,4.844Z" transform="translate(-7 8)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 411 B

@ -590,6 +590,7 @@
"noProvidersInFav": "ليس لديك أي مقدمي خدمات في المفضلة.",
"providerHasNoBranches": "هذا المزود ليس لديه فروع حتى الآن.",
"totalBranches": "إجمالي الفروع",
"memberSince": "عضو منذ"
"memberSince": "عضو منذ",
"reserved": "محجوز"
}

@ -411,7 +411,7 @@
"select": "Select",
"deleteAdConfirmation": "Do you want to delete the ad?",
"deleteAdConfirmationMessage": "Your ad will be permanently deleted and you cannot undo this action",
"mileage": "mileage",
"mileage": "Mileage",
"transmission": "Transmission",
"demand": "Demand",
"adDurationExpired": "Your Ad Duration time is over",
@ -591,5 +591,7 @@
"noProvidersInFav": "You have no providers in Favourites.",
"providerHasNoBranches": "This Provider has no branches yet.",
"totalBranches": "Total Branches",
"memberSince": "Member Since"
"memberSince": "Member Since",
"reserved": "Reserved"
}

@ -286,6 +286,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";
}
RegExp numReg = RegExp(r".*[0-9].*");
@ -301,8 +302,26 @@ class MyLocales {
}
class MyFonts {
static const poppinsFont = "packages/mc_common_app/Poppins";
static const gessTwoFont = "packages/mc_common_app/GessTwo";
static const poppinsFont = 'packages/mc_common_app/Poppins';
static const gessTwoFont = 'packages/mc_common_app/GessTwo';
static const FontWeight Thin = FontWeight.w100;
static const FontWeight ExtraLight = FontWeight.w200;
static const FontWeight Light = FontWeight.w300;
static const FontWeight Regular = FontWeight.w400;
static const FontWeight Medium = FontWeight.w500;
static const FontWeight SemiBold = FontWeight.w600;
static const FontWeight Bold = FontWeight.w700;
static const FontWeight ExtraBold = FontWeight.w800;
static const FontWeight Black = FontWeight.w900;
static const FontWeight ItalicRegular = FontWeight.w400;
static const FontWeight ItalicMedium = FontWeight.w500;
static const FontWeight ItalicSemiBold = FontWeight.w600;
static const FontWeight ItalicBold = FontWeight.w700;
static const FontWeight ItalicExtraBold = FontWeight.w800;
static const FontWeight ItalicBlack = FontWeight.w900;
}
class SignalrConsts {

@ -1,40 +1,46 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
import 'package:mc_common_app/classes/app_state.dart';
import 'package:mc_common_app/classes/consts.dart';
import 'package:mc_common_app/theme/colors.dart';
import 'package:mc_common_app/utils/enums.dart';
extension EmailValidator on String {
Widget toText(
{Color? color,
bool isBold = false,
double? fontSize,
bool isUnderLine = false,
bool isItalic = false,
TextDecoration? textDecoration,
double letterSpacing = 0,
TextAlign? textAlign,
FontWeight? fontWeight,
double? height,
Color? decorationColor,
TextOverflow? overflow,
int? maxLines}) =>
AutoSizeText(
this,
textAlign: textAlign,
maxLines: maxLines,
style: TextStyle(
overflow: overflow,
fontStyle: isItalic ? FontStyle.italic : null,
height: height,
decoration: isUnderLine ? TextDecoration.underline : textDecoration ?? TextDecoration.none,
decorationColor: decorationColor,
fontSize: fontSize ?? 10,
fontWeight: isBold ? FontWeight.bold : fontWeight ?? FontWeight.w600,
color: color ?? MyColors.darkTextColor,
letterSpacing: letterSpacing,
),
);
{Color? color,
bool isBold = false,
double? fontSize,
bool isUnderLine = false,
bool isItalic = false,
TextDecoration? textDecoration,
double letterSpacing = 0,
TextAlign? textAlign,
FontWeight? fontWeight,
double? height,
Color? decorationColor,
TextOverflow? overflow,
bool isUpperCase = false,
int? maxLines}) {
bool isArabic = AppState().postParamsObject!.languageID == 1; // arabic -> 1 , English -> 2
return AutoSizeText(
isUpperCase ? this.toUpperCase() : this,
textAlign: textAlign,
maxLines: maxLines,
style: TextStyle(
overflow: overflow,
fontStyle: isItalic ? FontStyle.italic : null,
height: height,
decoration: isUnderLine ? TextDecoration.underline : textDecoration ?? TextDecoration.none,
decorationColor: decorationColor ?? MyColors.provTextColor,
fontSize: fontSize ?? 10,
fontFamily: isArabic ? MyFonts.gessTwoFont : MyFonts.poppinsFont,
fontWeight: isBold ? FontWeight.bold : fontWeight ?? MyFonts.SemiBold,
color: color ?? MyColors.darkTextColor,
letterSpacing: letterSpacing,
),
);
}
bool isValidEmail() {
return RegExp(r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$').hasMatch(this);

@ -606,7 +606,8 @@ class CodegenLoader extends AssetLoader{
"noProvidersInFav": "ليس لديك أي مقدمي خدمات في المفضلة.",
"providerHasNoBranches": "هذا المزود ليس لديه فروع حتى الآن.",
"totalBranches": "إجمالي الفروع",
"memberSince": "عضو منذ"
"memberSince": "عضو منذ",
"reserved": "محجوز"
};
static const Map<String,dynamic> en_US = {
"firstTimeLogIn": "First Time Log In",
@ -1021,7 +1022,7 @@ static const Map<String,dynamic> en_US = {
"select": "Select",
"deleteAdConfirmation": "Do you want to delete the ad?",
"deleteAdConfirmationMessage": "Your ad will be permanently deleted and you cannot undo this action",
"mileage": "mileage",
"mileage": "Mileage",
"transmission": "Transmission",
"demand": "Demand",
"adDurationExpired": "Your Ad Duration time is over",
@ -1201,7 +1202,8 @@ static const Map<String,dynamic> en_US = {
"noProvidersInFav": "You have no providers in Favourites.",
"providerHasNoBranches": "This Provider has no branches yet.",
"totalBranches": "Total Branches",
"memberSince": "Member Since"
"memberSince": "Member Since",
"reserved": "Reserved"
};
static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US};
}

@ -570,5 +570,6 @@ abstract class LocaleKeys {
static const providerHasNoBranches = 'providerHasNoBranches';
static const totalBranches = 'totalBranches';
static const memberSince = 'memberSince';
static const reserved = 'reserved';
}

@ -32,6 +32,22 @@ class BranchDetailModel {
String? countryName;
bool isExpanded = false;
bool? isFavorite;
//I/flutter (23146): "id": 1021,
// I/flutter (23146): "serviceProviderID": 10,
// I/flutter (23146): "serviceProviderName": "string",
// I/flutter (23146): "cityID": 1,
// I/flutter (23146): "cityName": "Riyadh",
// I/flutter (23146): "branchName": "Al Arouba Cars",
// I/flutter (23146): "branchDescription": "des",
// I/flutter (23146): "address": "3289 Hilal Bin Omayah St - حي العليا, حي العليا, الرياض, RHOD3289, Saudi Arabia",
// I/flutter (23146): "latitude": "24.708521303151027",
// I/flutter (23146): "longitude": "46.666924171149724",
// I/flutter (23146): "distanceKM": 0.0,
// I/flutter (23146): "openTime": "09:00",
// I/flutter (23146): "closeTime": "18:00",
// I/flutter (23146): "branchStatus": 3,
// I/flutter (23146): "branchStatusText": "ApprovedOrActive",
BranchDetailModel({
this.id,
this.serviceProviderId,
@ -73,7 +89,12 @@ class BranchDetailModel {
}
BranchDetailModel.fromJson(Map<String, dynamic> json) {
List<GenericImageModel> images = populateBranchImages(json["serviceProviderBranchImage"]);
List<GenericImageModel> images = [];
if (json.containsKey('serviceProviderBranchImage')) {
images = populateBranchImages(json["serviceProviderBranchImage"]);
} else {
images = populateBranchImages(json["branchImages"]);
}
id = json["id"];
serviceProviderId = json["serviceProviderID"];
branchProfileImage = images.isNotEmpty ? images.first.imageUrl ?? "" : null;

@ -9,10 +9,10 @@ class AppTheme {
fontFamily: !isArabic ? MyFonts.poppinsFont : MyFonts.gessTwoFont,
primaryColor: primaryColor,
useMaterial3: false,
primaryTextTheme: const TextTheme(
titleLarge: TextStyle(color: Colors.white),
primaryTextTheme: TextTheme(
titleLarge: TextStyle(color: Colors.white, fontFamily: !isArabic ? MyFonts.poppinsFont : MyFonts.gessTwoFont,)
),
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.orange).copyWith(background: Colors.white),
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.orange).copyWith(surface: Colors.white),
);
}
}

@ -40,6 +40,9 @@ class MyColors {
static const Color greyAddBorderColor = Color(0xffEEEEEE);
static const Color lightGreyBgColor = Color(0xffFDFDFD);
static const Color lightGreyDDColor = Color(0xffDDDDDD);
static const Color greyColor = Color(0xff787878);
static const Color provTextColor = Color(0xFF28323A);
//AdStatusColors:
static const Color adActiveStatusColor = Color(0xff5FC16A);

@ -651,12 +651,13 @@ class UserVM extends BaseVM {
}
void changeLanguage(BuildContext context) {
print("${EasyLocalization.of(context)?.currentLocale}");
if (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA") {
context.setLocale(const Locale("en", "US"));
} else {
context.setLocale(const Locale('ar', 'SA'));
}
notifyListeners();
// notifyListeners();
}
void logout(BuildContext context) async {

@ -1,4 +1,5 @@
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/config/routes.dart';
import 'package:mc_common_app/extensions/int_extensions.dart';
@ -89,26 +90,30 @@ class AdCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
if (isAdsFragment && !context.read<AdVM>().isExploreAdsTapped) ...[
if (isAdsFragment && !context
.read<AdVM>()
.isExploreAdsTapped) ...[
Utils.statusContainerChip(text: adDetails.statuslabel!, chipColor: Utils.getChipColorByAdStatus(adDetails.adPostStatus!)),
],
(adDetails.vehicle!.vehicleTitle ?? "").toText(fontSize: 16, isBold: true),
(adDetails.vehicle!.vehicleTitle ?? "").toText(fontSize: 16, letterSpacing: -0.64, height: 25 / 16,),
Row(
children: [
("${LocaleKeys.model.tr()}:").toText(
color: MyColors.lightTextColor,
letterSpacing: -0.48, height: 18 / 12,
),
2.width,
(adDetails.vehicle!.modelyear!.label ?? "").toText(),
(adDetails.vehicle!.modelyear!.label ?? "").toText(fontSize: 12, letterSpacing: -0.48, height: 18 / 12,),
],
),
Row(
children: [
("${LocaleKeys.mileage.tr()}:").toText(
color: MyColors.lightTextColor,
fontSize: 12, letterSpacing: -0.48, height: 18 / 12,
),
2.width,
(adDetails.vehicle!.mileage!.mileageEnd ?? "").toText(),
(adDetails.vehicle!.mileage!.mileageEnd ?? "").toText(fontSize: 12, letterSpacing: -0.48, height: 18 / 12,),
],
),
],
@ -123,8 +128,8 @@ class AdCard extends StatelessWidget {
),
adDetails.createdOn != null
? DateTime.parse(adDetails.createdOn!).getTimeAgo().toText(
color: MyColors.lightTextColor,
)
color: MyColors.lightTextColor,
)
: const SizedBox(),
],
),
@ -138,15 +143,24 @@ class AdCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
(adDetails.vehicle!.demandAmount!.toInt().toString()).toText(fontSize: 16, isBold: true),
(adDetails.vehicle!.demandAmount!.toInt().toString()).toText(fontSize: 19, isBold: true, letterSpacing: -1.16, height: 29/19),
2.width,
LocaleKeys.sar.tr().toText(
color: MyColors.lightTextColor,
),
color: MyColors.lightTextColor,
fontSize: 10,
letterSpacing: -0.4,height: 16/10
),
],
),
),
const Icon(Icons.arrow_forward)
SvgPicture.asset(
MyAssets.arrowRight,
height: 9.69,
width: 13,
),
// const Icon(Icons.arrow_forward)
],
),
],

@ -17,6 +17,7 @@ import 'package:mc_common_app/view_models/dashboard_view_model_customer.dart';
import 'package:mc_common_app/widgets/common_widgets/custom_add_button_widget.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
import 'package:provider/provider.dart';
import 'package:sizer/sizer.dart';
class CommonAppointmentSliderWidget extends StatelessWidget {
final Function(AppointmentListModel)? onAppointmentClick;
@ -26,14 +27,14 @@ class CommonAppointmentSliderWidget extends StatelessWidget {
Widget getCarouselSliderWidget(AppType appType, AppointmentsVM appointmentsVM) {
return CarouselSlider.builder(
options: CarouselOptions(
height: appType == AppType.provider ? 110 : 140,
viewportFraction: 1.0,
height: appType == AppType.provider ? 121 : 140,
viewportFraction: 0.99999, // Todo: Dont do anything
enlargeCenterPage: false,
enableInfiniteScroll: false,
),
itemCount: appointmentsVM.myUpComingAppointments.length,
itemBuilder: (BuildContext context, int itemIndex, int pageViewIndex) => BuildAppointmentContainerForCustomer(
isForHome: appType == AppType.provider,
isForProvider: appType == AppType.provider,
appointmentListModel: appointmentsVM.myUpComingAppointments[itemIndex],
onTapped: () {
if (appType == AppType.provider) {
@ -140,11 +141,11 @@ class CommonAppointmentSliderWidget extends StatelessWidget {
}
class BuildAppointmentContainerForCustomer extends StatelessWidget {
final bool? isForHome;
final bool isForProvider;
final AppointmentListModel? appointmentListModel;
final Function()? onTapped;
const BuildAppointmentContainerForCustomer({Key? key, this.isForHome = false, this.onTapped, required this.appointmentListModel}) : super(key: key);
const BuildAppointmentContainerForCustomer({Key? key, this.isForProvider = false, this.onTapped, required this.appointmentListModel}) : super(key: key);
Widget showServices(String title, String icon, {bool isMoreText = false}) {
return Row(
@ -156,7 +157,7 @@ class BuildAppointmentContainerForCustomer extends StatelessWidget {
Flexible(
child: title.toText(
fontSize: 12,
isBold: true,
letterSpacing: -0.48,
color: isMoreText ? MyColors.primaryColor : MyColors.black,
),
),
@ -197,78 +198,77 @@ class BuildAppointmentContainerForCustomer extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
child: Column(
children: [
Row(
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
isForProvider // need to be updated through backend
? SizedBox()
: Image.asset(
MyAssets.bnCar,
width: 46,
height: 46,
fit: BoxFit.cover,
),
8.width,
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
isForHome != null && isForHome!
? Image.asset(
MyAssets.bnCar,
width: 56,
height: 56,
fit: BoxFit.fill,
).toCircle(borderRadius: 100)
: Image.asset(
MyAssets.bnCar,
width: 80,
height: 85,
fit: BoxFit.cover,
),
8.width,
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
(AppState().currentAppType == AppType.provider ? appointmentListModel!.customerName ?? "" : appointmentListModel!.branchName ?? "").toText(color: MyColors.black, isBold: true, fontSize: 16),
Row(
(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(
children: [
!isForProvider ? MyAssets.miniClock.buildSvg(height: 12) : SizedBox(),
2.width,
"${isForProvider ? "Appt. on:" : ""} ${appointmentListModel!.duration ?? ""} ${appointmentListModel!.appointmentDate!.toFormattedDateWithoutTime()}"
.toText(color: MyColors.lightTextColor, fontSize: 12, letterSpacing: -0.48, height: 19 / 12),
],
),
8.height,
!isForProvider
? Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
MyAssets.miniClock.buildSvg(height: 12),
2.width,
"${appointmentListModel!.duration ?? ""} ${appointmentListModel!.appointmentDate!.toFormattedDateWithoutTime()}".toText(
color: MyColors.lightTextColor,
fontSize: 12,
LocaleKeys.appointment_details.tr().toText(
color: MyColors.primaryColor,
isUnderLine: true,
fontSize: 14,
letterSpacing: -0.56,
),
SvgPicture.asset(
MyAssets.arrowRight,
height: 9.69,
width: 13,
),
],
),
9.height,
isForHome != null && isForHome!
? 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),
],
)
: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: Column(
children: buildServicesFromAppointment(appointmentListModel: appointmentListModel!),
),
),
const Icon(
Icons.arrow_forward,
),
],
)
: 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,
),
],
),
],
),
],
).onPress(onTapped!).toWhiteContainer(width: double.infinity, allPading: 12),
);
),
],
).onPress(onTapped!).toWhiteContainer(
width: double.infinity,
allPading: 12,
);
}
}

@ -17,9 +17,14 @@ import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
import 'package:provider/provider.dart';
class SettingOptionsLanguage extends StatelessWidget {
class SettingOptionsLanguage extends StatefulWidget {
const SettingOptionsLanguage({super.key});
@override
State<SettingOptionsLanguage> createState() => _SettingOptionsLanguageState();
}
class _SettingOptionsLanguageState extends State<SettingOptionsLanguage> {
@override
Widget build(BuildContext context) {
return Scaffold(
@ -87,6 +92,9 @@ class SettingOptionsLanguage extends StatelessWidget {
isForLanguage: true,
onTap: () {
context.read<UserVM>().changeLanguage(context);
Future.delayed(Duration(seconds: 1), () {
setState(() {});
});
},
).toWhiteContainer(width: double.infinity, pading: const EdgeInsets.all(12), borderRadius: 0),
10.height,

@ -30,6 +30,8 @@ class BranchDetailCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
print("Provider Image Title" + title);
print("Provider Image URL" + providerImageUrl);
return Padding(
padding: EdgeInsets.zero,
// padding: const EdgeInsets.only(

@ -17,12 +17,11 @@ class ViewAllWidget extends StatelessWidget {
padding: const EdgeInsets.only(bottom: 7),
child: Row(
children: [
Expanded(child: title.toText(isBold: true, fontSize: 18)),
Expanded(child: title.toText( fontSize: 18, isUpperCase: true)),
InkWell(
onTap: onSubtitleTapped,
child: subTitle.toText(
fontSize: 11,
isBold: true,
color: MyColors.primaryColor,
textDecoration: TextDecoration.underline,
),

@ -24,7 +24,8 @@ extension ExtendedText on Widget {
}
extension ContainerExt on Widget {
Widget toWhiteContainer({required double width, double? allPading, EdgeInsets? pading, EdgeInsets? margin, VoidCallback? onTap, Color? backgroundColor, bool isBorderRequired = false, double borderRadius = 0}) {
Widget toWhiteContainer(
{required double width, double? allPading, EdgeInsets? pading, EdgeInsets? margin, VoidCallback? onTap, Color? backgroundColor, bool isBorderRequired = false, double borderRadius = 0}) {
return InkWell(
onTap: onTap,
child: Container(
@ -83,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),
@ -233,7 +234,8 @@ extension WidgetExt on Widget {
);
}
Widget paddingOnly({double left = 0.0, double right = 0.0, double top = 0.0, double bottom = 0.0}) => Padding(padding: EdgeInsets.only(left: left, right: right, top: top, bottom: bottom), child: this);
Widget paddingOnly({double left = 0.0, double right = 0.0, double top = 0.0, double bottom = 0.0}) =>
Padding(padding: EdgeInsets.only(left: left, right: right, top: top, bottom: bottom), child: this);
// Widget onTap(VoidCallback onTap, {double corners = 0}) {
// return Clickable.widget(child: this, corners: corners, onTap: onTap);
@ -359,18 +361,17 @@ extension BuildSVG on String? {
errorBuilder: (BuildContext context, Object obj, StackTrace? s) {
return SizedBox(height: height, width: width, child: const Icon(Icons.signal_wifi_connected_no_internet_4_outlined));
},
// loadingBuilder: (BuildContext context, Widget? child, ImageChunkEvent? imageChunk) {
// return SizedBox(
// height: height,
// width: width,
// child: const Center(
// child: CircularProgressIndicator(
// strokeWidth: 0.7,
// color: MyColors.darkPrimaryColor,
// ),
// ).paddingAll(10),
// );
// },
loadingBuilder: (BuildContext context, Widget? child, ImageChunkEvent? imageChunk) {
if (imageChunk == null) {
return child!;
}
return const Center(
child: CircularProgressIndicator(
strokeWidth: 0.5,
color: MyColors.darkPrimaryColor,
),
);
},
fit: fit,
color: color,
height: height,
@ -381,7 +382,12 @@ extension BuildSVG on String? {
extension LocaleSetup on MultiProvider {
Widget setupLocale() {
return EasyLocalization(supportedLocales: MyLocales.supportedLocales, fallbackLocale: MyLocales.fallBackLocale, startLocale: MyLocales.startLocale, assetLoader: MyLocales.assetLoader, path: MyLocales.localesAssetPath, child: this);
return EasyLocalization(supportedLocales: MyLocales.supportedLocales,
fallbackLocale: MyLocales.fallBackLocale,
startLocale: MyLocales.startLocale,
assetLoader: MyLocales.assetLoader,
path: MyLocales.localesAssetPath,
child: this);
}
}

@ -85,7 +85,36 @@ flutter:
fonts:
- family: Poppins
fonts:
- asset: assets/fonts/Poppins-Thin.ttf
weight: 100
- asset: assets/fonts/Poppins-ExtraLight.ttf
weight: 200
- asset: assets/fonts/Poppins-Light.ttf
weight: 300
- asset: assets/fonts/Poppins-Regular.ttf
weight: 400
- asset: assets/fonts/Poppins-Medium.ttf
weight: 500
- asset: assets/fonts/Poppins-SemiBold.ttf
weight: 600
- asset: assets/fonts/Poppins-Bold.ttf
weight: 700
- asset: assets/fonts/Poppins-ExtraBold.ttf
weight: 800
- asset: assets/fonts/Poppins-Black.ttf
weight: 900
- asset: assets/fonts/Poppins-Italic.ttf
weight: 400
- asset: assets/fonts/Poppins-MediumItalic.ttf
weight: 500
- asset: assets/fonts/Poppins-SemiBoldItalic.ttf
weight: 600
- asset: assets/fonts/Poppins-BoldItalic.ttf
weight: 700
- asset: assets/fonts/Poppins-ExtraBoldItalic.ttf
weight: 800
- asset: assets/fonts/Poppins-BlackItalic.ttf
weight: 900
- family: GessTwo
fonts:
- asset: assets/fonts/GESS-Two-Light.otf

Loading…
Cancel
Save