|
|
|
|
@ -26,6 +26,7 @@ import 'package:mohem_flutter_app/ui/landing/widget/services_widget.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_banner.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/widgets/bottom_sheet.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/widgets/dialogs/dialogs.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/widgets/mark_attendance_widget.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/widgets/shimmer/offers_shimmer_widget.dart';
|
|
|
|
|
@ -62,7 +63,9 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
|
data = Provider.of<DashboardProviderModel>(context, listen: false);
|
|
|
|
|
marathonProvider = Provider.of<MarathonProvider>(context, listen: false);
|
|
|
|
|
cProvider = Provider.of<ChatProviderModel>(context, listen: false);
|
|
|
|
|
_bHubCon();
|
|
|
|
|
if (checkIfPrivilegedForChat()) {
|
|
|
|
|
_bHubCon();
|
|
|
|
|
}
|
|
|
|
|
_onRefresh(true);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -143,7 +146,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
|
data.fetchMenuEntries();
|
|
|
|
|
data.getCategoryOffersListAPI(context);
|
|
|
|
|
marathonProvider.getMarathonDetailsFromApi();
|
|
|
|
|
if(isFromInit) {
|
|
|
|
|
if (isFromInit) {
|
|
|
|
|
checkERMChannel();
|
|
|
|
|
}
|
|
|
|
|
if (!cProvider.disbaleChatForThisUser && !isFromInit) checkHubCon();
|
|
|
|
|
@ -166,15 +169,6 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
|
"masterId": val.result!.data!.notificationMasterId,
|
|
|
|
|
"advertisement": value.mohemmItgResponseItem!.result!.data!.advertisement,
|
|
|
|
|
});
|
|
|
|
|
// Navigator.push(
|
|
|
|
|
// context,
|
|
|
|
|
// MaterialPageRoute(
|
|
|
|
|
// builder: (BuildContext context) => ITGAdsScreen(
|
|
|
|
|
// addMasterId: val.result!.data!.notificationMasterId!,
|
|
|
|
|
// advertisement: value.mohemmItgResponseItem!.result!.data!.advertisement!,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -188,46 +182,6 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
|
|
|
|
key: _scaffoldState,
|
|
|
|
|
// appBar: AppBar(
|
|
|
|
|
// actions: [
|
|
|
|
|
// IconButton(
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// data.getITGNotification().then((val) {
|
|
|
|
|
// if (val!.result!.data != null) {
|
|
|
|
|
// print("-------------------- Survey ----------------------------");
|
|
|
|
|
// if (val.result!.data!.notificationType == "Survey") {
|
|
|
|
|
// Navigator.pushNamed(context, AppRoutes.survey, arguments: val.result!.data);
|
|
|
|
|
// } else {
|
|
|
|
|
// print("------------------------------------------- Ads --------------------");
|
|
|
|
|
// DashboardApiClient().getAdvertisementDetail(val.result!.data!.notificationMasterId ?? "").then(
|
|
|
|
|
// (value) {
|
|
|
|
|
// if (value!.mohemmItgResponseItem!.statusCode == 200) {
|
|
|
|
|
// if (value.mohemmItgResponseItem!.result!.data != null) {
|
|
|
|
|
// Navigator.pushNamed(context, AppRoutes.advertisement, arguments: {
|
|
|
|
|
// "masterId": val.result!.data!.notificationMasterId,
|
|
|
|
|
// "advertisement": value.mohemmItgResponseItem!.result!.data!.advertisement,
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// // Navigator.push(
|
|
|
|
|
// // context,
|
|
|
|
|
// // MaterialPageRoute(
|
|
|
|
|
// // builder: (BuildContext context) => ITGAdsScreen(
|
|
|
|
|
// // addMasterId: val.result!.data!.notificationMasterId!,
|
|
|
|
|
// // advertisement: value.mohemmItgResponseItem!.result!.data!.advertisement!,
|
|
|
|
|
// // ),
|
|
|
|
|
// // ),
|
|
|
|
|
// // );
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
// icon: Icon(Icons.add))
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
@ -288,7 +242,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
LocaleKeys.welcomeBack.tr().toText14(color: MyColors.grey77Color),
|
|
|
|
|
(AppState().memberInformationList!.eMPLOYEENAME ?? "").toText24(isBold: true),
|
|
|
|
|
16.height,
|
|
|
|
|
@ -673,7 +627,6 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Navigator.pushNamed(context, AppRoutes.offersAndDiscountsDetails, arguments: getOffersDetailList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|