|
|
|
@ -27,114 +27,99 @@ class MenusWidget extends StatelessWidget {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
data.isWorkListLoading
|
|
|
|
data.isWorkListLoading
|
|
|
|
? MenuShimmer().onPress(() {
|
|
|
|
? MenuShimmer().onPress(() {
|
|
|
|
data.fetchWorkListCounter(context, showLoading: true);
|
|
|
|
data.fetchWorkListCounter(context, showLoading: true);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
: Container(
|
|
|
|
: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(color: Color(namesColor[0]), borderRadius: BorderRadius.circular(10)),
|
|
|
|
color: Color(namesColor[0]),
|
|
|
|
child: Column(
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
),
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
LocaleKeys.workList.tr().toText12(color: Colors.white),
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
LocaleKeys.workList.tr().toText12(color: Colors.white),
|
|
|
|
Expanded(child: data.workListCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1)),
|
|
|
|
Row(
|
|
|
|
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
|
|
|
|
children: [
|
|
|
|
],
|
|
|
|
Expanded(
|
|
|
|
),
|
|
|
|
child: data.workListCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
|
|
|
|
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
|
|
|
|
).onPress(() {
|
|
|
|
],
|
|
|
|
Navigator.pushNamed(context, AppRoutes.workList);
|
|
|
|
)
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
|
|
|
|
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
|
|
|
|
|
|
|
|
).onPress(() {
|
|
|
|
|
|
|
|
Navigator.pushNamed(context, AppRoutes.workList);
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
data.isMissingSwipeLoading
|
|
|
|
data.isMissingSwipeLoading
|
|
|
|
? MenuShimmer().onPress(() {
|
|
|
|
? MenuShimmer().onPress(() {
|
|
|
|
data.fetchWorkListCounter(context);
|
|
|
|
data.fetchWorkListCounter(context);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
: Container(
|
|
|
|
: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(color: Color(namesColor[1]), borderRadius: BorderRadius.circular(10)),
|
|
|
|
color: Color(namesColor[1]),
|
|
|
|
child: Column(
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
),
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
LocaleKeys.missingSwipes.tr().toText12(color: Colors.white),
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
LocaleKeys.missingSwipes.tr().toText12(color: Colors.white),
|
|
|
|
Expanded(child: data.missingSwipeCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1)),
|
|
|
|
Row(
|
|
|
|
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
|
|
|
|
children: [
|
|
|
|
],
|
|
|
|
Expanded(
|
|
|
|
),
|
|
|
|
child: data.missingSwipeCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
|
|
|
|
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
|
|
|
|
).onPress(() {
|
|
|
|
],
|
|
|
|
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(LocaleKeys.missingSwipes.tr(), "HMG_OTL_MISSING_SWIPE_EIT_SS"));
|
|
|
|
)
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
|
|
|
|
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
|
|
|
|
|
|
|
|
).onPress(() {
|
|
|
|
|
|
|
|
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(LocaleKeys.missingSwipes.tr(), "HMG_OTL_MISSING_SWIPE_EIT_SS"));
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
data.isLeaveTicketBalanceLoading
|
|
|
|
data.isLeaveTicketBalanceLoading
|
|
|
|
? MenuShimmer().onPress(() {
|
|
|
|
? MenuShimmer().onPress(() {
|
|
|
|
data.fetchWorkListCounter(context);
|
|
|
|
data.fetchWorkListCounter(context);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
: Container(
|
|
|
|
: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(color: Color(namesColor[2]), borderRadius: BorderRadius.circular(10)),
|
|
|
|
color: Color(namesColor[2]),
|
|
|
|
child: Column(
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
),
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
LocaleKeys.leaveBalance.tr().toText12(color: Colors.white),
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
LocaleKeys.leaveBalance.tr().toText12(color: Colors.white),
|
|
|
|
Expanded(child: data.leaveBalance.toStringAsFixed(2).toText16(color: Colors.white, isBold: true, maxlines: 1)),
|
|
|
|
Row(
|
|
|
|
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
|
|
|
|
children: [
|
|
|
|
],
|
|
|
|
Expanded(
|
|
|
|
),
|
|
|
|
child: data.leaveBalance.toStringAsFixed(2).toText16(color: Colors.white, isBold: true, maxlines: 1),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
|
|
|
|
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
|
|
|
|
).onPress(() {
|
|
|
|
],
|
|
|
|
Navigator.pushNamed(context, AppRoutes.leaveBalance);
|
|
|
|
)
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
|
|
|
|
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
|
|
|
|
|
|
|
|
).onPress(() {
|
|
|
|
|
|
|
|
Navigator.pushNamed(context, AppRoutes.leaveBalance);
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
data.isLeaveTicketBalanceLoading
|
|
|
|
data.isLeaveTicketBalanceLoading
|
|
|
|
? MenuShimmer().onPress(() {
|
|
|
|
? MenuShimmer().onPress(() {
|
|
|
|
data.fetchWorkListCounter(context);
|
|
|
|
data.fetchWorkListCounter(context);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
: Container(
|
|
|
|
: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(color: Color(namesColor[3]), borderRadius: BorderRadius.circular(10)),
|
|
|
|
color: Color(namesColor[3]),
|
|
|
|
child: Column(
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
),
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
data.ticketBookingResponse != null && data.ticketBookingResponse!.success
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
? "Wallet Balance".toText12(color: Colors.white)
|
|
|
|
children: [
|
|
|
|
: LocaleKeys.ticketBalance.tr().toText12(color: Colors.white),
|
|
|
|
LocaleKeys.ticketBalance.tr().toText12(color: Colors.white),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child:
|
|
|
|
child: data.ticketBalance.toStringAsFixed(2).toText16(color: Colors.white, isBold: true, maxlines: 1),
|
|
|
|
data.ticketBookingResponse != null && data.ticketBookingResponse!.success
|
|
|
|
),
|
|
|
|
? data.walletBalance.toStringAsFixed(0).toText16(color: Colors.white, isBold: true, maxlines: 1)
|
|
|
|
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
|
|
|
|
: data.ticketBalance.toStringAsFixed(2).toText16(color: Colors.white, isBold: true, maxlines: 1),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
|
|
|
|
),
|
|
|
|
).onPress(
|
|
|
|
],
|
|
|
|
() {
|
|
|
|
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
|
|
|
|
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(LocaleKeys.ticketBalance.tr(), "HMG_TKT_NEW_EIT_SS"));
|
|
|
|
).onPress(() {
|
|
|
|
},
|
|
|
|
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(LocaleKeys.ticketBalance.tr(), "HMG_TKT_NEW_EIT_SS"));
|
|
|
|
)
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|