greeting_card
aamir-csol 2 weeks ago
parent ba8908d4eb
commit a958257ce9

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1.2 MiB

@ -531,7 +531,7 @@
"noWinner": "حزين! لم يفز أحد اليوم.", "noWinner": "حزين! لم يفز أحد اليوم.",
"myTeam": "فريقي", "myTeam": "فريقي",
"youCanPlayDemo": "لكن يمكنك لعب العرض", "youCanPlayDemo": "لكن يمكنك لعب العرض",
"group" : "مجموعة", "group": "مجموعة",
"searchGroup": "مجموعة البحث", "searchGroup": "مجموعة البحث",
"connectHmgWifi": "قم بتوصيل HMG WIFI", "connectHmgWifi": "قم بتوصيل HMG WIFI",
"connectedHmgWifi": "اتصال HMG WIFI", "connectedHmgWifi": "اتصال HMG WIFI",
@ -575,20 +575,20 @@
"versionStatus": "حالة الإصدار", "versionStatus": "حالة الإصدار",
"supplierNo": "رقم المورد", "supplierNo": "رقم المورد",
"general": "عام", "general": "عام",
"requesterOperatingUnit":"وحدة تشغيل مقدم الطلب", "requesterOperatingUnit": "وحدة تشغيل مقدم الطلب",
"prepareEmpNum":"إعداد رقم الموظف", "prepareEmpNum": "إعداد رقم الموظف",
"supplierInfo" : "معلومات المورد", "supplierInfo": "معلومات المورد",
"supplierAcNo": "رقم حساب المورد", "supplierAcNo": "رقم حساب المورد",
"supplierAcName": "اسم حساب المورد", "supplierAcName": "اسم حساب المورد",
"supplierIBAN" : "رقم IBAN للمورد", "supplierIBAN": "رقم IBAN للمورد",
"supplierCRNo" :"رقم السجل التجاري", "supplierCRNo": "رقم السجل التجاري",
"suppliedAcNo" : "رقم الحساب المقدم", "suppliedAcNo": "رقم الحساب المقدم",
"patientRefundInvoice" : "فاتورة استرداد الأموال للمريض", "patientRefundInvoice": "فاتورة استرداد الأموال للمريض",
"patientNumber" : "رقم المريض", "patientNumber": "رقم المريض",
"patientName" : "اسم المريض", "patientName": "اسم المريض",
"invoiceDate" : "تاريخ الفاتورة", "invoiceDate": "تاريخ الفاتورة",
"refundInvoice" :"فاتورة الاسترجاع", "refundInvoice": "فاتورة الاسترجاع",
"hospitalClinic" : "عيادة المستشفى", "hospitalClinic": "عيادة المستشفى",
"graphicalAnalysis": "التحليل الرسومي", "graphicalAnalysis": "التحليل الرسومي",
"itemHistoryAnalysis": "تحليل تاريخ العنصر", "itemHistoryAnalysis": "تحليل تاريخ العنصر",
"pOno": "امر شراء #", "pOno": "امر شراء #",
@ -614,13 +614,13 @@
"members": "الأعضاء", "members": "الأعضاء",
"searchByUserName": "البحث بواسطة اسم المستخدم", "searchByUserName": "البحث بواسطة اسم المستخدم",
"shareScreen": "مشاركة الشاشة", "shareScreen": "مشاركة الشاشة",
"start":"يبدأ", "start": "يبدأ",
"about":"عن", "about": "عن",
"explore": "يستكشف", "explore": "يستكشف",
"mazaya": "مازيا", "mazaya": "مازيا",
"benefits": "فوائد", "benefits": "فوائد",
"mazayaDesc": "اكتشف الخصومات والعروض الخاصة المتاحة للموظفين", "mazayaDesc": "اكتشف الخصومات والعروض الخاصة المتاحة للموظفين",
"viewallofferMazaya" : "أعرض كل المزايا", "viewallofferMazaya": "أعرض كل المزايا",
"buyerName": "اسم المشتري", "buyerName": "اسم المشتري",
"buyerNumber": "رقم المشتري", "buyerNumber": "رقم المشتري",
"highestBidder": "أعلى مزايد", "highestBidder": "أعلى مزايد",
@ -643,5 +643,6 @@
"faRequest": "طلب التخلص من FA", "faRequest": "طلب التخلص من FA",
"showMore": "عرض المزيد", "showMore": "عرض المزيد",
"buyerDetails": "تفاصيل المشتري", "buyerDetails": "تفاصيل المشتري",
"parkingQr": "وقوف السيارات QR" "parkingQr": "وقوف السيارات QR",
"startNow": "ابدأ الآن"
} }

@ -565,7 +565,7 @@
"addAtLeastOneAttachment": "Please add at least one attachment.", "addAtLeastOneAttachment": "Please add at least one attachment.",
"pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.", "pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.",
"youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit.", "youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit.",
"requesterOperatingUnit":"Requester Operating Unit", "requesterOperatingUnit": "Requester Operating Unit",
"generate": "Generate", "generate": "Generate",
"paymentRequest": "Pay Request", "paymentRequest": "Pay Request",
"paymentDetails": "Payment Details", "paymentDetails": "Payment Details",
@ -591,19 +591,19 @@
"versionStatus": "Version Status", "versionStatus": "Version Status",
"supplierNo": "Supplier No", "supplierNo": "Supplier No",
"general": "General", "general": "General",
"prepareEmpNum":"Prepare Employee Num", "prepareEmpNum": "Prepare Employee Num",
"supplierInfo" : "Supplier Information", "supplierInfo": "Supplier Information",
"supplierAcNo": "Supplier Account No", "supplierAcNo": "Supplier Account No",
"supplierAcName":"Supplier Account Name", "supplierAcName": "Supplier Account Name",
"supplierIBAN" : "Supplier IBAN", "supplierIBAN": "Supplier IBAN",
"supplierCRNo" : "CR Number", "supplierCRNo": "CR Number",
"suppliedAcNo" : "Supplied Account No.", "suppliedAcNo": "Supplied Account No.",
"patientRefundInvoice" : "Patient Refund Invoice", "patientRefundInvoice": "Patient Refund Invoice",
"patientNumber" : "Patient Number", "patientNumber": "Patient Number",
"patientName" : "Patient Name", "patientName": "Patient Name",
"invoiceDate" : "Invoice Date", "invoiceDate": "Invoice Date",
"refundInvoice" :"Refund Invoice", "refundInvoice": "Refund Invoice",
"hospitalClinic" : "Hospital Clinic", "hospitalClinic": "Hospital Clinic",
"graphicalAnalysis": "Graphical Analysis", "graphicalAnalysis": "Graphical Analysis",
"itemHistoryAnalysis": "Item History Analysis", "itemHistoryAnalysis": "Item History Analysis",
"pOno": "P.O #", "pOno": "P.O #",
@ -612,13 +612,13 @@
"qtyReceived": "Qty. Received", "qtyReceived": "Qty. Received",
"bonusQty": "Bonus Qty.", "bonusQty": "Bonus Qty.",
"balQty": "Bal. Qty.", "balQty": "Bal. Qty.",
"start":"Start", "start": "Start",
"about":"About", "about": "About",
"explore": "Explore", "explore": "Explore",
"mazaya": "MAZAYA", "mazaya": "MAZAYA",
"benefits": "Benefits", "benefits": "Benefits",
"mazayaDesc": "Discover special Discounts and offers available to Employees", "mazayaDesc": "Discover special Discounts and offers available to Employees",
"viewallofferMazaya" : "View All Offers", "viewallofferMazaya": "View All Offers",
"buyerName": "Buyer Name", "buyerName": "Buyer Name",
"buyerNumber": "Buyer Number", "buyerNumber": "Buyer Number",
"highestBidder": "Highest Bidder", "highestBidder": "Highest Bidder",
@ -638,8 +638,9 @@
"purchasedPrice": "Purchased Price", "purchasedPrice": "Purchased Price",
"usefulLife": "Useful Life", "usefulLife": "Useful Life",
"yearsUsed": "Years Used", "yearsUsed": "Years Used",
"faRequest":"FA Disposal Request", "faRequest": "FA Disposal Request",
"showMore": "Show More", "showMore": "Show More",
"buyerDetails": "Buyer Details", "buyerDetails": "Buyer Details",
"parkingQr": "Parking QR" "parkingQr": "Parking QR",
"startNow": "Start Now"
} }

@ -656,7 +656,8 @@ class CodegenLoader extends AssetLoader{
"faRequest": "طلب التخلص من FA", "faRequest": "طلب التخلص من FA",
"showMore": "عرض المزيد", "showMore": "عرض المزيد",
"buyerDetails": "تفاصيل المشتري", "buyerDetails": "تفاصيل المشتري",
"parkingQr": "وقوف السيارات QR" "parkingQr": "وقوف السيارات QR",
"startNow": "ابدأ الآن"
}; };
static const Map<String,dynamic> _en_US = { static const Map<String,dynamic> _en_US = {
"mohemm": "Mohemm", "mohemm": "Mohemm",
@ -1300,7 +1301,8 @@ static const Map<String,dynamic> _en_US = {
"faRequest": "FA Disposal Request", "faRequest": "FA Disposal Request",
"showMore": "Show More", "showMore": "Show More",
"buyerDetails": "Buyer Details", "buyerDetails": "Buyer Details",
"parkingQr": "Parking QR" "parkingQr": "Parking QR",
"startNow": "Start Now"
}; };
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};
} }

@ -629,5 +629,6 @@ abstract class LocaleKeys {
static const showMore = 'showMore'; static const showMore = 'showMore';
static const buyerDetails = 'buyerDetails'; static const buyerDetails = 'buyerDetails';
static const parkingQr = 'parkingQr'; static const parkingQr = 'parkingQr';
static const startNow = 'startNow';
} }

@ -68,6 +68,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
bool isOffersLoading = true; bool isOffersLoading = true;
List<OffersListModel> getOffersList = []; List<OffersListModel> getOffersList = [];
bool isGreetingCardsLoading = true;
bool isDisplayEidGreetings = false; bool isDisplayEidGreetings = false;
List<GetGreetingCardsModelResponseElement>? greetingCardsList; List<GetGreetingCardsModelResponseElement>? greetingCardsList;
@ -119,6 +120,8 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
getMenuEntriesList = null; getMenuEntriesList = null;
isOffersLoading = true; isOffersLoading = true;
getOffersList = []; getOffersList = [];
isGreetingCardsLoading = true;
isDisplayEidGreetings = false;
drawerMenuItemList = [ drawerMenuItemList = [
DrawerMenuItem("assets/images/drawer/my_profile.svg", LocaleKeys.myProfile.tr(), AppRoutes.profile), DrawerMenuItem("assets/images/drawer/my_profile.svg", LocaleKeys.myProfile.tr(), AppRoutes.profile),
@ -312,22 +315,23 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
} }
void fetchGreetingCards() async { void fetchGreetingCards() async {
isGreetingCardsLoading = true;
notifyListeners();
try { try {
GetGreetingCardsModelResponse? response = await DashboardApiClient().getGreetingCards(); GetGreetingCardsModelResponse? response = await DashboardApiClient().getGreetingCards();
greetingCardsList = response?.getGreetingCardsModelResponse ?? []; greetingCardsList = response?.getGreetingCardsModelResponse ?? [];
// Check if there are any active greeting cards
if (greetingCardsList != null && greetingCardsList!.isNotEmpty) { if (greetingCardsList != null && greetingCardsList!.isNotEmpty) {
isDisplayEidGreetings = greetingCardsList!.any((card) => card.isActive == true); isDisplayEidGreetings = greetingCardsList!.any((card) => card.isActive == true);
} else { } else {
isDisplayEidGreetings = false; isDisplayEidGreetings = false;
} }
isGreetingCardsLoading = false;
notifyListeners(); notifyListeners();
} catch (ex) { } catch (ex) {
logger.wtf(ex); logger.wtf(ex);
isDisplayEidGreetings = false; isDisplayEidGreetings = false;
greetingCardsList = []; greetingCardsList = [];
isGreetingCardsLoading = false;
notifyListeners(); notifyListeners();
} }
} }

@ -1,7 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'dart:ui' as ui; import 'dart:ui' as ui;
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
@ -284,9 +283,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
}); });
}, },
), ),
Image Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 28).expanded,
.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 28)
.expanded,
SvgPicture.asset("assets/images/announcements.svg", matchTextDirection: true).onPress(() async { SvgPicture.asset("assets/images/announcements.svg", matchTextDirection: true).onPress(() async {
await Navigator.pushNamed(context, AppRoutes.announcements); await Navigator.pushNamed(context, AppRoutes.announcements);
}), }),
@ -426,136 +423,99 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
), ),
], ],
).paddingOnly(left: 21, right: 21, top: 7, bottom: 21), ).paddingOnly(left: 21, right: 21, top: 7, bottom: 21),
if (data.isDisplayEidGreetings) ...[ Consumer<DashboardProviderModel>(
Column( builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
mainAxisSize: MainAxisSize.min, if (model.isGreetingCardsLoading) {
crossAxisAlignment: CrossAxisAlignment.start, return const GreetingCardShimmer();
} else if (model.isDisplayEidGreetings) {
return Column(
children: [ children: [
Directionality( Directionality(
textDirection: AppState().isArabic(context) ? ui.TextDirection.rtl : ui.TextDirection.ltr, textDirection: AppState().isArabic(context) ? ui.TextDirection.rtl : ui.TextDirection.ltr,
child: Container( child: Container(
height: 100,
decoration: BoxDecoration( decoration: BoxDecoration(
color: const Color(0xFFFAF4E7),
border: Border.all(width: 2, color: const Color(0xFFE7E7E7)),
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
gradient: const LinearGradient(colors: [Color(0xFFE7E7E7), Color(0xFFE7E7E7)], begin: Alignment.centerLeft, end: Alignment.centerRight), image: const DecorationImage(
image: NetworkImage(
"https://dummyimage.com/1200X600/faf4e7/faf4e7.jpg&text=0",
// AppState().isArabic(context) ? model.greetingCardsList!.first.backgroundImageUrlAr ?? "" : model.greetingCardsList!.first.backgroundImageUrlEn ?? "",
),
fit: BoxFit.cover,
),
), ),
child: Padding(
padding: const EdgeInsets.all(3.0),
child: Container(
height: 120,
decoration: BoxDecoration(color: const Color(0xFFFAF4E7),borderRadius: BorderRadius.circular(17), image: DecorationImage(image: NetworkImage(AppState().isArabic(context) ? data.greetingCardsList!.first.backgroundImageUrlAr ?? "" : data.greetingCardsList!.first.backgroundImageUrlEn ?? ""), fit: BoxFit.cover)),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// Expanded( SvgPicture.asset("assets/images/greeting.svg", width: 65, height: 81),
// flex: 4, const SizedBox(width: 10),
// child: Column( Row(
// crossAxisAlignment: CrossAxisAlignment.start, children: [
// mainAxisAlignment: MainAxisAlignment.start, Column(
// children: [ crossAxisAlignment: CrossAxisAlignment.start,
// Row( mainAxisAlignment: MainAxisAlignment.start,
// children: [ children: [
// Expanded( Row(
// flex: 2, children: [
// child: RichText( Text(
// text: AppState().isArabic(context) ? model.greetingCardsList!.first.descriptionAr ?? '' : model.greetingCardsList!.first.descriptionEn ?? '',
// AppState().isArabic(context) style: TextStyle(
// ? TextSpan( fontSize: AppState().isArabic(context) ? 18 : 16,
// children: [ letterSpacing: -0.2,
// TextSpan( fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins',
// text: 'اطلع على مميزات', fontWeight: FontWeight.w700,
// style: TextStyle( height: 24 / 16,
// fontSize: 16, color: const Color(0xFF3B3E4F),
// letterSpacing: -0.2, ),
// fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins', ),
// fontWeight: FontWeight.w700,
// height: 24 / 16,
// color: const Color(0xFF5D5E5E),
// ),
// ),
// TextSpan(
// text: ' مزايا',
// style: TextStyle(
// fontSize: 16,
// fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins',
// fontWeight: FontWeight.w700,
// letterSpacing: -0.2,
// height: 24 / 16,
// color: MyColors.mazayaRedColor, // Use your MAZAYA red color here if defined, e.g. MyColors.mazayaRed
// ),
// ),
// ],
// )
// : TextSpan(
// children: [
// TextSpan(
// text: LocaleKeys.explore.tr() + ' ',
// style: const TextStyle(
// fontSize: 16,
// letterSpacing: -0.2,
// fontFamily: 'Poppins',
// fontWeight: FontWeight.w700,
// height: 24 / 16,
// color: Color(0xFF5D5E5E),
// ),
// ),
// TextSpan(
// text: LocaleKeys.mazaya.tr(),
// style: const TextStyle(
// fontSize: 16,
// fontWeight: FontWeight.w700,
// fontFamily: 'Poppins',
// letterSpacing: -0.2,
// height: 24 / 16,
// color: MyColors.mazayaRedColor, // Use your MAZAYA red color here if defined, e.g. MyColors.mazayaRed
// ),
// ),
// TextSpan(
// text: ' ' + LocaleKeys.benefits.tr(),
// style: const TextStyle(
// fontSize: 16,
// letterSpacing: -0.2,
// fontFamily: 'Poppins',
// fontWeight: FontWeight.w700,
// height: 24 / 16,
// color: Color(0xFF5D5E5E),
// ),
// ),
// ],
// ),
// ),
// ),
// const Expanded(flex: 1, child: SizedBox()),
// ],
// ),
// const SizedBox(height: 8),
// LocaleKeys.mazayaDesc.tr().toText11(color: const Color(0xFF5D5E5E)),
// ],
// ),
// ),
// Expanded(
// flex: 2,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.end,
// mainAxisAlignment: MainAxisAlignment.end,
// children: [
// SvgPicture.asset("assets/icons/mazaya_brand.svg", width: 90, height: 47),
// const SizedBox(height: 28),
// LocaleKeys.viewallofferMazaya.tr().toText12(isUnderLine: true, color: const Color(0xFF3B3D4A)).onPress(() {
// Navigator.pushNamed(context, AppRoutes.offersAndDiscounts);
// }),
// ],
// ),
// ),
], ],
).paddingOnly(left: 21, right: 21, top: 14, bottom: 14),
), ),
Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
AppState().isArabic(context) ? model.greetingCardsList!.first.titleAr ?? '' : model.greetingCardsList!.first.titleEn ?? '',
style: TextStyle(
fontSize: AppState().isArabic(context) ? 18 : 16,
letterSpacing: -0.2,
fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins',
fontWeight: FontWeight.w700,
height: 24 / 16,
color: const Color(0xFF3B3E4F),
), ),
).paddingOnly(left: 21, right: 21, top: 0, bottom: 21),
), ),
], ],
), ),
], ],
),
],
).paddingOnly(top: 10, bottom: 10).expanded,
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: [
LocaleKeys.startNow.tr().toText12(isUnderLine: true, color: const Color(0xFF3B3D4A)).onPress(() {
Navigator.pushNamed(context, AppRoutes.offersAndDiscounts);
}),
],
),
],
).paddingOnly(left: 8, right: 8, top: 6, bottom: 12),
).paddingOnly(left: 21, right: 21, top: 14, bottom: 14),
),
],
);
} else {
return const SizedBox();
}
},
),
eventActivityWidget(context), eventActivityWidget(context),
if (isDisplayMazaya) ...[ if (isDisplayMazaya) ...[
Column( Column(
@ -954,16 +914,9 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
} }
Widget eventActivityWidget(BuildContext context) { Widget eventActivityWidget(BuildContext context) {
return (context return (context.watch<DashboardProviderModel>().isEventLoadingLoading)
.watch<DashboardProviderModel>()
.isEventLoadingLoading)
? const MarathonBannerShimmer().paddingOnly(left: 21, right: 21, bottom: 21, top: 0) ? const MarathonBannerShimmer().paddingOnly(left: 21, right: 21, bottom: 21, top: 0)
: (context : (context.watch<DashboardProviderModel>().eventActivity != null && context.watch<DashboardProviderModel>().eventActivity!.isActive == true)
.watch<DashboardProviderModel>()
.eventActivity != null && context
.watch<DashboardProviderModel>()
.eventActivity!
.isActive == true)
? const EventActivityBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 0) ? const EventActivityBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 0)
: const SizedBox(); : const SizedBox();
} }

@ -92,7 +92,7 @@ class ServicesWidget extends StatelessWidget {
aspectRatio: 105 / 105, aspectRatio: 105 / 105,
child: child:
data.isServicesMenusLoading data.isServicesMenusLoading
? ServicesMenuShimmer() ? const ServicesMenuShimmer()
: Container( : Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
@ -266,7 +266,6 @@ class ServicesWidget extends StatelessWidget {
await pro.fetchTicketAccuralBalance(context, DateTime.now()); await pro.fetchTicketAccuralBalance(context, DateTime.now());
pro.ticketHistoryTransactionList = await EITApiClient().getEITTransactions("HMG_TICKET_ITENARY_HR_EIT_SS", isCompleteList: true); pro.ticketHistoryTransactionList = await EITApiClient().getEITTransactions("HMG_TICKET_ITENARY_HR_EIT_SS", isCompleteList: true);
Utils.hideLoading(context); Utils.hideLoading(context);
// Here Need Work // Here Need Work
Navigator.push(context, MaterialPageRoute(builder: (BuildContext context) => TicketDetailedScreen(url: url, jwtToken: ssoToken.data!.accessToken))); Navigator.push(context, MaterialPageRoute(builder: (BuildContext context) => TicketDetailedScreen(url: url, jwtToken: ssoToken.data!.accessToken)));
@ -311,7 +310,7 @@ class ServicesWidget extends StatelessWidget {
padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13), padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13),
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemBuilder: (cxt, index) { itemBuilder: (cxt, index) {
return AspectRatio(aspectRatio: 105 / 105, child: ServicesMenuShimmer()); return AspectRatio(aspectRatio: 105 / 105, child: const ServicesMenuShimmer());
}, },
separatorBuilder: (cxt, index) => 9.width, separatorBuilder: (cxt, index) => 9.width,
itemCount: 4, itemCount: 4,

@ -8,6 +8,8 @@ import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:shimmer/shimmer.dart'; import 'package:shimmer/shimmer.dart';
class GetAttendanceTrackingShimmer extends StatelessWidget { class GetAttendanceTrackingShimmer extends StatelessWidget {
const GetAttendanceTrackingShimmer({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -85,6 +87,8 @@ class GetAttendanceTrackingShimmer extends StatelessWidget {
} }
class MenuShimmer extends StatelessWidget { class MenuShimmer extends StatelessWidget {
const MenuShimmer({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -122,6 +126,8 @@ class MenuShimmer extends StatelessWidget {
} }
class ServicesHeaderShimmer extends StatelessWidget { class ServicesHeaderShimmer extends StatelessWidget {
const ServicesHeaderShimmer({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Row( return Row(
@ -145,6 +151,8 @@ class ServicesHeaderShimmer extends StatelessWidget {
} }
class ServicesMenuShimmer extends StatelessWidget { class ServicesMenuShimmer extends StatelessWidget {
const ServicesMenuShimmer({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -188,6 +196,75 @@ class ServicesMenuShimmer extends StatelessWidget {
} }
} }
class GreetingCardShimmer extends StatelessWidget {
const GreetingCardShimmer({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
height: 100,
decoration: BoxDecoration(
color: const Color(0xFFFAF4E7),
border: Border.all(width: 2, color: const Color(0xFFE7E7E7)),
borderRadius: BorderRadius.circular(20),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 65,
height: 81,
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(10),
),
).toShimmer(),
const SizedBox(width: 10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: 150,
height: 16,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(4),
),
).toShimmer(),
const SizedBox(height: 8),
Container(
width: 120,
height: 16,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(4),
),
).toShimmer(),
],
).expanded,
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
width: 60,
height: 12,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(4),
),
).toShimmer(),
],
),
],
).paddingOnly(left: 8, right: 8, top: 6, bottom: 12),
).paddingOnly(left: 21, right: 21, top: 14, bottom: 14);
}
}
class MarathonBannerShimmer extends StatelessWidget { class MarathonBannerShimmer extends StatelessWidget {
const MarathonBannerShimmer({Key? key}) : super(key: key); const MarathonBannerShimmer({Key? key}) : super(key: key);
@ -305,3 +382,4 @@ class ChatHomeShimmer extends StatelessWidget {
)); ));
} }
} }

Loading…
Cancel
Save