|
|
|
|
@ -6,6 +6,7 @@ import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
@ -14,7 +15,8 @@ class MenusWidget extends StatelessWidget {
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
List<int> namesColor = [0xff125765, 0xff239D8F, 0xff2BB8A8, 0xff1D92AA];
|
|
|
|
|
|
|
|
|
|
return Consumer<DashboardProviderModel>(builder: (cxt, data, child) {
|
|
|
|
|
return Consumer<DashboardProviderModel>(
|
|
|
|
|
builder: (cxt, data, child) {
|
|
|
|
|
return GridView(
|
|
|
|
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 2 / 2, crossAxisSpacing: 9, mainAxisSpacing: 9),
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
@ -39,7 +41,7 @@ class MenusWidget extends StatelessWidget {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: data.workListCounter.toString().toText16(color: Colors.white, isBold: true,maxlines: 1),
|
|
|
|
|
child: data.workListCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1),
|
|
|
|
|
),
|
|
|
|
|
SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)
|
|
|
|
|
],
|
|
|
|
|
@ -66,7 +68,7 @@ class MenusWidget extends StatelessWidget {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: data.missingSwipeCounter.toString().toText16(color: Colors.white, isBold: true,maxlines: 1),
|
|
|
|
|
child: data.missingSwipeCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1),
|
|
|
|
|
),
|
|
|
|
|
SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)
|
|
|
|
|
],
|
|
|
|
|
@ -74,7 +76,7 @@ class MenusWidget extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
Navigator.pushNamed(context, AppRoutes.workList);
|
|
|
|
|
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(LocaleKeys.missingSwipes.tr(), "HMG_OTL_MISSING_SWIPE_EIT_SS"));
|
|
|
|
|
}),
|
|
|
|
|
data.isLeaveTicketBalanceLoading
|
|
|
|
|
? MenuShimmer().onPress(() {
|
|
|
|
|
@ -93,7 +95,7 @@ class MenusWidget extends StatelessWidget {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: data.leaveBalance.toString().toText16(color: Colors.white, isBold: true,maxlines: 1),
|
|
|
|
|
child: data.leaveBalance.toString().toText16(color: Colors.white, isBold: true, maxlines: 1),
|
|
|
|
|
),
|
|
|
|
|
SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)
|
|
|
|
|
],
|
|
|
|
|
@ -120,18 +122,21 @@ class MenusWidget extends StatelessWidget {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: data.ticketBalance.toString().toText16(color: Colors.white, isBold: true,maxlines: 1),
|
|
|
|
|
child: data.ticketBalance.toString().toText16(color: Colors.white, isBold: true, maxlines: 1),
|
|
|
|
|
),
|
|
|
|
|
SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
Navigator.pushNamed(context, AppRoutes.workList);
|
|
|
|
|
})
|
|
|
|
|
).onPress(
|
|
|
|
|
() {
|
|
|
|
|
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(LocaleKeys.ticketBalance.tr(), "HMG_TKT_NEW_EIT_SS"));
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|