|
|
|
@ -165,7 +165,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
if (!cProvider.disbaleChatForThisUser && !isFromInit) checkHubCon();
|
|
|
|
if (!cProvider.disbaleChatForThisUser && !isFromInit) checkHubCon();
|
|
|
|
_refreshController.refreshCompleted();
|
|
|
|
_refreshController.refreshCompleted();
|
|
|
|
|
|
|
|
|
|
|
|
await data.fetchTicketBooking();
|
|
|
|
// await data.fetchTicketBooking();
|
|
|
|
|
|
|
|
|
|
|
|
// if (data.ticketBookingResponse != null && !data.ticketBookingResponse!.success) {
|
|
|
|
// if (data.ticketBookingResponse != null && !data.ticketBookingResponse!.success) {
|
|
|
|
// data.fetchTicketBalance();
|
|
|
|
// data.fetchTicketBalance();
|
|
|
|
@ -185,18 +185,13 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
ItgMainRes? response = await DashboardApiClient().getAdvertisementDetail(list[ermIndex].notificationMasterId ?? "");
|
|
|
|
ItgMainRes? response = await DashboardApiClient().getAdvertisementDetail(list[ermIndex].notificationMasterId ?? "");
|
|
|
|
// Utils.hideLoading(context);
|
|
|
|
// Utils.hideLoading(context);
|
|
|
|
if (response!.mohemmItgResponseItem!.result!.data != null) {
|
|
|
|
if (response!.mohemmItgResponseItem!.result!.data != null) {
|
|
|
|
for (ItgResponseData payload in response.mohemmItgResponseItem!.result!.data!) {
|
|
|
|
|
|
|
|
if (payload.notificationMasterId == list[ermIndex].notificationMasterId) {
|
|
|
|
|
|
|
|
payload.deadline = list[ermIndex].deadline;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (list[ermIndex].notificationType == "Survey") {
|
|
|
|
if (list[ermIndex].notificationType == "Survey") {
|
|
|
|
await Navigator.pushNamed(context, AppRoutes.survey, arguments: response.mohemmItgResponseItem!.result!.data!.first);
|
|
|
|
await Navigator.pushNamed(context, AppRoutes.survey, arguments: response.mohemmItgResponseItem!.result!.data!.first);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
await Navigator.pushNamed(
|
|
|
|
await Navigator.pushNamed(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
AppRoutes.advertisement,
|
|
|
|
AppRoutes.advertisement,
|
|
|
|
arguments: {"masterId": list[ermIndex].notificationMasterId, "advertisement": response.mohemmItgResponseItem!.result!.data!.first},
|
|
|
|
arguments: {"masterId": list[ermIndex].notificationMasterId, "advertisement": response.mohemmItgResponseItem!.result!.data!.first.advertisement},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -290,9 +285,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);
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
@ -324,103 +317,103 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
child: Consumer<DashboardProviderModel>(
|
|
|
|
child: Consumer<DashboardProviderModel>(
|
|
|
|
builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
|
|
|
|
builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
|
|
|
|
return (model.isAttendanceTrackingLoading
|
|
|
|
return (model.isAttendanceTrackingLoading
|
|
|
|
? GetAttendanceTrackingShimmer()
|
|
|
|
? GetAttendanceTrackingShimmer()
|
|
|
|
: Container(
|
|
|
|
: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(15),
|
|
|
|
borderRadius: BorderRadius.circular(15),
|
|
|
|
gradient: const LinearGradient(
|
|
|
|
gradient: const LinearGradient(
|
|
|
|
transform: GradientRotation(.46),
|
|
|
|
transform: GradientRotation(.46),
|
|
|
|
begin: Alignment.topRight,
|
|
|
|
begin: Alignment.topRight,
|
|
|
|
end: Alignment.bottomLeft,
|
|
|
|
end: Alignment.bottomLeft,
|
|
|
|
colors: [MyColors.gradiantEndColor, MyColors.gradiantStartColor],
|
|
|
|
colors: [MyColors.gradiantEndColor, MyColors.gradiantStartColor],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Stack(
|
|
|
|
child: Stack(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
if (model.isTimeRemainingInSeconds == 0) SvgPicture.asset("assets/images/thumb.svg"),
|
|
|
|
if (model.isTimeRemainingInSeconds == 0) SvgPicture.asset("assets/images/thumb.svg"),
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
LocaleKeys.markAttendance.tr().toText14(color: Colors.white, isBold: true),
|
|
|
|
LocaleKeys.markAttendance.tr().toText14(color: Colors.white, isBold: true),
|
|
|
|
if (model.isTimeRemainingInSeconds == 0) DateTime.now().toString().split(" ")[0].toText12(color: Colors.white),
|
|
|
|
if (model.isTimeRemainingInSeconds == 0) DateTime.now().toString().split(" ")[0].toText12(color: Colors.white),
|
|
|
|
if (model.isTimeRemainingInSeconds != 0)
|
|
|
|
if (model.isTimeRemainingInSeconds != 0)
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
9.height,
|
|
|
|
|
|
|
|
Directionality(
|
|
|
|
|
|
|
|
textDirection: ui.TextDirection.ltr,
|
|
|
|
|
|
|
|
child: CountdownTimer(
|
|
|
|
|
|
|
|
endTime: model.endTime,
|
|
|
|
|
|
|
|
onEnd: null,
|
|
|
|
|
|
|
|
endWidget: "00:00:00".toText14(color: Colors.white, isBold: true),
|
|
|
|
|
|
|
|
textStyle: const TextStyle(color: Colors.white, fontSize: 14, letterSpacing: -0.48, fontWeight: FontWeight.bold),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
LocaleKeys.timeLeftToday.tr().toText12(color: Colors.white),
|
|
|
|
|
|
|
|
9.height,
|
|
|
|
|
|
|
|
ClipRRect(
|
|
|
|
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
|
|
|
|
|
|
|
child: LinearProgressIndicator(
|
|
|
|
|
|
|
|
value: model.progress,
|
|
|
|
|
|
|
|
minHeight: 8,
|
|
|
|
|
|
|
|
valueColor: const AlwaysStoppedAnimation<Color>(Colors.white),
|
|
|
|
|
|
|
|
backgroundColor: const Color(0xff196D73),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
).paddingOnly(top: 12, right: 15, left: 12),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
9.height,
|
|
|
|
Expanded(
|
|
|
|
Directionality(
|
|
|
|
child: Column(
|
|
|
|
textDirection: ui.TextDirection.ltr,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
child: CountdownTimer(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
endTime: model.endTime,
|
|
|
|
children: [
|
|
|
|
onEnd: null,
|
|
|
|
LocaleKeys.checkIn.tr().toText12(color: Colors.white),
|
|
|
|
endWidget: "00:00:00".toText14(color: Colors.white, isBold: true),
|
|
|
|
(model.attendanceTracking!.pSwipeIn == null ? "--:--" : model.attendanceTracking!.pSwipeIn).toString().toText14(
|
|
|
|
textStyle: const TextStyle(color: Colors.white, fontSize: 14, letterSpacing: -0.48, fontWeight: FontWeight.bold),
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
isBold: true,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
4.height,
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
).paddingOnly(left: 12, right: 12),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
LocaleKeys.timeLeftToday.tr().toText12(color: Colors.white),
|
|
|
|
Container(
|
|
|
|
9.height,
|
|
|
|
margin: EdgeInsets.only(top: AppState().isArabic(context) ? 6 : 0),
|
|
|
|
ClipRRect(
|
|
|
|
width: 45,
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
|
|
|
height: 45,
|
|
|
|
child: LinearProgressIndicator(
|
|
|
|
padding: const EdgeInsets.only(left: 10, right: 10),
|
|
|
|
value: model.progress,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
minHeight: 8,
|
|
|
|
color: const Color(0xff259EA4),
|
|
|
|
valueColor: const AlwaysStoppedAnimation<Color>(Colors.white),
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
backgroundColor: const Color(0xff196D73),
|
|
|
|
bottomRight: AppState().isArabic(context) ? const Radius.circular(0) : const Radius.circular(15),
|
|
|
|
|
|
|
|
bottomLeft: AppState().isArabic(context) ? const Radius.circular(15) : const Radius.circular(0),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/biometrics.svg" : "assets/images/biometrics.svg"),
|
|
|
|
|
|
|
|
).onPress(() {
|
|
|
|
|
|
|
|
showMyBottomSheet(context, callBackFunc: () {}, child: MarkAttendanceWidget(model, isFromDashboard: true));
|
|
|
|
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingOnly(top: 12, right: 15, left: 12),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
LocaleKeys.checkIn.tr().toText12(color: Colors.white),
|
|
|
|
|
|
|
|
(model.attendanceTracking!.pSwipeIn == null ? "--:--" : model.attendanceTracking!.pSwipeIn).toString().toText14(
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
isBold: true,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
4.height,
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
).paddingOnly(left: 12, right: 12),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(top: AppState().isArabic(context) ? 6 : 0),
|
|
|
|
|
|
|
|
width: 45,
|
|
|
|
|
|
|
|
height: 45,
|
|
|
|
|
|
|
|
padding: const EdgeInsets.only(left: 10, right: 10),
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
color: const Color(0xff259EA4),
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
|
|
|
bottomRight: AppState().isArabic(context) ? const Radius.circular(0) : const Radius.circular(15),
|
|
|
|
|
|
|
|
bottomLeft: AppState().isArabic(context) ? const Radius.circular(15) : const Radius.circular(0),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/biometrics.svg" : "assets/images/biometrics.svg"),
|
|
|
|
|
|
|
|
).onPress(() {
|
|
|
|
|
|
|
|
showMyBottomSheet(context, callBackFunc: () {}, child: MarkAttendanceWidget(model, isFromDashboard: true));
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
).onPress(() {
|
|
|
|
),
|
|
|
|
Navigator.pushNamed(context, AppRoutes.todayAttendance);
|
|
|
|
],
|
|
|
|
}))
|
|
|
|
),
|
|
|
|
|
|
|
|
).onPress(() {
|
|
|
|
|
|
|
|
Navigator.pushNamed(context, AppRoutes.todayAttendance);
|
|
|
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
.animatedSwither();
|
|
|
|
.animatedSwither();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -490,70 +483,70 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
flex: 2,
|
|
|
|
flex: 2,
|
|
|
|
child: RichText(
|
|
|
|
child: RichText(
|
|
|
|
text:
|
|
|
|
text:
|
|
|
|
AppState().isArabic(context)
|
|
|
|
AppState().isArabic(context)
|
|
|
|
? TextSpan(
|
|
|
|
? TextSpan(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
TextSpan(
|
|
|
|
text: 'اطلع على مميزات',
|
|
|
|
text: 'اطلع على مميزات',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontSize: 16,
|
|
|
|
letterSpacing: -0.2,
|
|
|
|
letterSpacing: -0.2,
|
|
|
|
fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins',
|
|
|
|
fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins',
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
height: 24 / 16,
|
|
|
|
height: 24 / 16,
|
|
|
|
color: const Color(0xFF5D5E5E),
|
|
|
|
color: const Color(0xFF5D5E5E),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextSpan(
|
|
|
|
TextSpan(
|
|
|
|
text: ' مزايا',
|
|
|
|
text: ' مزايا',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontSize: 16,
|
|
|
|
fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins',
|
|
|
|
fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins',
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
letterSpacing: -0.2,
|
|
|
|
letterSpacing: -0.2,
|
|
|
|
height: 24 / 16,
|
|
|
|
height: 24 / 16,
|
|
|
|
color: MyColors.mazayaRedColor, // Use your MAZAYA red color here if defined, e.g. MyColors.mazayaRed
|
|
|
|
color: MyColors.mazayaRedColor, // Use your MAZAYA red color here if defined, e.g. MyColors.mazayaRed
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: TextSpan(
|
|
|
|
: TextSpan(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
TextSpan(
|
|
|
|
text: LocaleKeys.explore.tr() + ' ',
|
|
|
|
text: LocaleKeys.explore.tr() + ' ',
|
|
|
|
style: const TextStyle(
|
|
|
|
style: const TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontSize: 16,
|
|
|
|
letterSpacing: -0.2,
|
|
|
|
letterSpacing: -0.2,
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
height: 24 / 16,
|
|
|
|
height: 24 / 16,
|
|
|
|
color: Color(0xFF5D5E5E),
|
|
|
|
color: Color(0xFF5D5E5E),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextSpan(
|
|
|
|
TextSpan(
|
|
|
|
text: LocaleKeys.mazaya.tr(),
|
|
|
|
text: LocaleKeys.mazaya.tr(),
|
|
|
|
style: const TextStyle(
|
|
|
|
style: const TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
letterSpacing: -0.2,
|
|
|
|
letterSpacing: -0.2,
|
|
|
|
height: 24 / 16,
|
|
|
|
height: 24 / 16,
|
|
|
|
color: MyColors.mazayaRedColor, // Use your MAZAYA red color here if defined, e.g. MyColors.mazayaRed
|
|
|
|
color: MyColors.mazayaRedColor, // Use your MAZAYA red color here if defined, e.g. MyColors.mazayaRed
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextSpan(
|
|
|
|
TextSpan(
|
|
|
|
text: ' ' + LocaleKeys.benefits.tr(),
|
|
|
|
text: ' ' + LocaleKeys.benefits.tr(),
|
|
|
|
style: const TextStyle(
|
|
|
|
style: const TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontSize: 16,
|
|
|
|
letterSpacing: -0.2,
|
|
|
|
letterSpacing: -0.2,
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
height: 24 / 16,
|
|
|
|
height: 24 / 16,
|
|
|
|
color: Color(0xFF5D5E5E),
|
|
|
|
color: Color(0xFF5D5E5E),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const Expanded(flex: 1, child: SizedBox()),
|
|
|
|
const Expanded(flex: 1, child: SizedBox()),
|
|
|
|
@ -633,42 +626,42 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
return model.isOffersLoading
|
|
|
|
return model.isOffersLoading
|
|
|
|
? const OffersShimmerWidget()
|
|
|
|
? const OffersShimmerWidget()
|
|
|
|
: InkWell(
|
|
|
|
: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
navigateToDetails(data.getOffersList[index]);
|
|
|
|
navigateToDetails(data.getOffersList[index]);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: SizedBox(
|
|
|
|
child: SizedBox(
|
|
|
|
width: 73,
|
|
|
|
width: 73,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: 73,
|
|
|
|
width: 73,
|
|
|
|
height: 73,
|
|
|
|
height: 73,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(100)),
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(100)),
|
|
|
|
border: Border.all(color: MyColors.lightGreyE3Color, width: 1),
|
|
|
|
border: Border.all(color: MyColors.lightGreyE3Color, width: 1),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: ClipRRect(
|
|
|
|
child: ClipRRect(
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(50)),
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(50)),
|
|
|
|
child: Hero(
|
|
|
|
child: Hero(
|
|
|
|
tag: "ItemImage" + data.getOffersList[index].offersDiscountId.toString()!,
|
|
|
|
tag: "ItemImage" + data.getOffersList[index].offersDiscountId.toString()!,
|
|
|
|
transitionOnUserGestures: true,
|
|
|
|
transitionOnUserGestures: true,
|
|
|
|
child: Image.network(data.getOffersList[index].logo ?? "", fit: BoxFit.contain),
|
|
|
|
child: Image.network(data.getOffersList[index].logo ?? "", fit: BoxFit.contain),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
4.height,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
4.height,
|
|
|
|
child:
|
|
|
|
Expanded(
|
|
|
|
AppState().isArabic(context)
|
|
|
|
child:
|
|
|
|
? data.getOffersList[index].titleAr!.toText12(isCenter: true, maxLine: 1)
|
|
|
|
AppState().isArabic(context)
|
|
|
|
: data.getOffersList[index].titleEn!.toText12(isCenter: true, maxLine: 1),
|
|
|
|
? data.getOffersList[index].titleAr!.toText12(isCenter: true, maxLine: 1)
|
|
|
|
),
|
|
|
|
: data.getOffersList[index].titleEn!.toText12(isCenter: true, maxLine: 1),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => 8.width,
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => 8.width,
|
|
|
|
itemCount: 9,
|
|
|
|
itemCount: 9,
|
|
|
|
@ -691,9 +684,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
ServicesWidget(),
|
|
|
|
ServicesWidget(),
|
|
|
|
context
|
|
|
|
context.watch<MarathonProvider>().isLoading ? const MarathonBannerShimmer().paddingAll(20) : const MarathonBanner().paddingOnly(left: 21, right: 21, bottom: 8, top: 8),
|
|
|
|
.watch<MarathonProvider>()
|
|
|
|
|
|
|
|
.isLoading ? const MarathonBannerShimmer().paddingAll(20) : const MarathonBanner().paddingOnly(left: 21, right: 21, bottom: 8, top: 8),
|
|
|
|
|
|
|
|
// context.watch<MarathonProvider>().isTutorialLoading
|
|
|
|
// context.watch<MarathonProvider>().isTutorialLoading
|
|
|
|
// ? const MarathonBannerShimmer().paddingAll(20)
|
|
|
|
// ? const MarathonBannerShimmer().paddingAll(20)
|
|
|
|
// : Container(
|
|
|
|
// : Container(
|
|
|
|
@ -797,28 +788,28 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
SvgPicture.asset(
|
|
|
|
SvgPicture.asset(
|
|
|
|
"assets/icons/chat/chat.svg",
|
|
|
|
"assets/icons/chat/chat.svg",
|
|
|
|
color:
|
|
|
|
color:
|
|
|
|
!checkIfPrivilegedForChat()
|
|
|
|
!checkIfPrivilegedForChat()
|
|
|
|
? MyColors.lightGreyE3Color
|
|
|
|
? MyColors.lightGreyE3Color
|
|
|
|
: currentIndex == 4
|
|
|
|
: currentIndex == 4
|
|
|
|
? MyColors.grey3AColor
|
|
|
|
? MyColors.grey3AColor
|
|
|
|
: cProvider.disbaleChatForThisUser
|
|
|
|
: cProvider.disbaleChatForThisUser
|
|
|
|
? MyColors.lightGreyE3Color
|
|
|
|
? MyColors.lightGreyE3Color
|
|
|
|
: MyColors.grey98Color,
|
|
|
|
: MyColors.grey98Color,
|
|
|
|
).paddingAll(4),
|
|
|
|
).paddingAll(4),
|
|
|
|
Consumer<ChatProviderModel>(
|
|
|
|
Consumer<ChatProviderModel>(
|
|
|
|
builder: (BuildContext cxt, ChatProviderModel data, Widget? child) {
|
|
|
|
builder: (BuildContext cxt, ChatProviderModel data, Widget? child) {
|
|
|
|
return !checkIfPrivilegedForChat()
|
|
|
|
return !checkIfPrivilegedForChat()
|
|
|
|
? const SizedBox()
|
|
|
|
? const SizedBox()
|
|
|
|
: Positioned(
|
|
|
|
: Positioned(
|
|
|
|
right: 0,
|
|
|
|
right: 0,
|
|
|
|
top: 0,
|
|
|
|
top: 0,
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
padding: const EdgeInsets.only(left: 4, right: 4),
|
|
|
|
padding: const EdgeInsets.only(left: 4, right: 4),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(color: cProvider.disbaleChatForThisUser ? MyColors.pinkDarkColor : MyColors.redColor, borderRadius: BorderRadius.circular(17)),
|
|
|
|
decoration: BoxDecoration(color: cProvider.disbaleChatForThisUser ? MyColors.pinkDarkColor : MyColors.redColor, borderRadius: BorderRadius.circular(17)),
|
|
|
|
child: data.chatUConvCounter.toString().toText10(color: Colors.white),
|
|
|
|
child: data.chatUConvCounter.toString().toText10(color: Colors.white),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -854,16 +845,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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|