no message

master
Sultan khan 2 weeks ago
parent 8fbd1188a6
commit a6804f4d05

@ -90,7 +90,7 @@ class AppState {
String get getHuaweiPushToken => _huaweiPushToken; String get getHuaweiPushToken => _huaweiPushToken;
final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 10.0, mobileType: Platform.isAndroid ? "android" : "ios"); final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 33, versionID: 10.0, mobileType: Platform.isAndroid ? "android" : "ios");
void setPostParamsInitConfig() { void setPostParamsInitConfig() {
isAuthenticated = false; isAuthenticated = false;

@ -23,6 +23,7 @@ import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/ui/landing/event_activity_banner.dart'; import 'package:mohem_flutter_app/ui/landing/event_activity_banner.dart';
import 'package:mohem_flutter_app/ui/landing/widget/app_drawer.dart'; import 'package:mohem_flutter_app/ui/landing/widget/app_drawer.dart';
import 'package:mohem_flutter_app/ui/landing/widget/menus_widget.dart'; import 'package:mohem_flutter_app/ui/landing/widget/menus_widget.dart';
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
import 'package:mohem_flutter_app/ui/landing/widget/services_widget.dart'; 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/marathon_provider.dart';
import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_banner.dart'; import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_banner.dart';
@ -154,15 +155,15 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
data.fetchLeaveTicketBalance(context, DateTime.now()); data.fetchLeaveTicketBalance(context, DateTime.now());
data.fetchMenuEntries(); data.fetchMenuEntries();
data.fetchEventActivity(); // data.fetchEventActivity();
data.getCategoryOffersListAPI(context); // data.getCategoryOffersListAPI(context);
data.fetchGreetingCards(); data.fetchGreetingCards();
// marathonProvider.getMarathonDetailsFromApi(); // marathonProvider.getMarathonDetailsFromApi();
// marathonProvider.getMarathonTutorial(); // marathonProvider.getMarathonTutorial();
if (isFromInit) { if (isFromInit) {
checkERMChannel(); checkERMChannel();
} }
if (!cProvider.disbaleChatForThisUser && !isFromInit) checkHubCon(); // if (!cProvider.disbaleChatForThisUser && !isFromInit) checkHubCon();
_refreshController.refreshCompleted(); _refreshController.refreshCompleted();
await data.fetchTicketBooking(); await data.fetchTicketBooking();
@ -293,9 +294,9 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
Image Image
.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 28) .asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 28)
.expanded, .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);
}), // }),
], ],
).paddingOnly(left: 21, right: 21, top: 48, bottom: 7), ).paddingOnly(left: 21, right: 21, top: 48, bottom: 7),
Expanded( Expanded(
@ -588,96 +589,96 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
), ),
], ],
(data != null && data.getOffersList.isNotEmpty) ? Column( // (data != null && data.getOffersList.isNotEmpty) ? Column(
mainAxisSize: MainAxisSize.min, // mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Row( // Row(
crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: [ // children: [
Expanded( // Expanded(
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, // mainAxisSize: MainAxisSize.min,
children: [ // children: [
LocaleKeys.offers.tr().toText12(), // LocaleKeys.offers.tr().toText12(),
Row( // Row(
children: [ // children: [
LocaleKeys.discounts.tr().toText24(isBold: true), // LocaleKeys.discounts.tr().toText24(isBold: true),
6.width, // 6.width,
Container( // Container(
padding: const EdgeInsets.only(left: 8, right: 8), // padding: const EdgeInsets.only(left: 8, right: 8),
decoration: BoxDecoration(color: MyColors.yellowColor, borderRadius: BorderRadius.circular(10)), // decoration: BoxDecoration(color: MyColors.yellowColor, borderRadius: BorderRadius.circular(10)),
child: LocaleKeys.newString.tr().toText10(isBold: true), // child: LocaleKeys.newString.tr().toText10(isBold: true),
), // ),
], // ],
), // ),
], // ],
), // ),
), // ),
LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true).onPress(() { // LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true).onPress(() {
Navigator.pushNamed(context, AppRoutes.offersAndDiscounts); // Navigator.pushNamed(context, AppRoutes.offersAndDiscounts);
}), // }),
], // ],
).paddingOnly(left: 21, right: 21), // ).paddingOnly(left: 21, right: 21),
Consumer<DashboardProviderModel>( // Consumer<DashboardProviderModel>(
builder: (BuildContext context, DashboardProviderModel model, Widget? child) { // builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
return SizedBox( // return SizedBox(
height: 103 + 33, // height: 103 + 33,
child: ListView.separated( // child: ListView.separated(
shrinkWrap: true, // shrinkWrap: true,
physics: const BouncingScrollPhysics(), // physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.only(left: 21, right: 21, top: 13), // padding: const EdgeInsets.only(left: 21, right: 21, top: 13),
scrollDirection: Axis.horizontal, // scrollDirection: Axis.horizontal,
itemBuilder: (BuildContext cxt, int index) { // itemBuilder: (BuildContext cxt, int index) {
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, // 4.height,
Expanded( // Expanded(
child: // child:
AppState().isArabic(context) // AppState().isArabic(context)
? data.getOffersList[index].titleAr!.toText12(isCenter: true, maxLine: 1) // ? data.getOffersList[index].titleAr!.toText12(isCenter: true, maxLine: 1)
: data.getOffersList[index].titleEn!.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,
), // ),
); // );
}, // },
), // ),
], // ],
) : const SizedBox(), // ) : const SizedBox(),
Container( Container(
width: double.infinity, width: double.infinity,
@ -757,8 +758,8 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
label: LocaleKeys.home.tr(), label: LocaleKeys.home.tr(),
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: SvgPicture.asset("assets/icons/create_req.svg", color: currentIndex == 1 ? MyColors.grey3AColor : MyColors.grey98Color).paddingAll(4), icon: SvgPicture.asset("assets/images/drawer/my_requests.svg", color: currentIndex == 1 ? MyColors.grey3AColor : MyColors.grey98Color).paddingAll(4),
label: LocaleKeys.mowadhafhiRequest.tr(), label: LocaleKeys.myRequest.tr(),
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Stack( icon: Stack(
@ -787,43 +788,12 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
label: LocaleKeys.workList.tr(), label: LocaleKeys.workList.tr(),
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: SvgPicture.asset("assets/icons/item_for_sale.svg", color: currentIndex == 3 ? MyColors.grey3AColor : MyColors.grey98Color).paddingAll(4), icon: SvgPicture.asset("assets/images/ticket_bal.svg", color: currentIndex == 3 ? MyColors.grey3AColor : MyColors.grey98Color, height: 22, width: 22).paddingAll(4),
label: LocaleKeys.itemsForSale.tr(), label: LocaleKeys.ticketBalance.tr(),
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Stack( icon: SvgPicture.asset("assets/images/drawer/my_profile.svg", color: currentIndex == 4 ? MyColors.grey3AColor : MyColors.grey98Color, height: 20, width: 20).paddingAll(4),
alignment: Alignment.centerLeft, label: LocaleKeys.myProfile.tr(),
children: [
SvgPicture.asset(
"assets/icons/chat/chat.svg",
color:
!checkIfPrivilegedForChat()
? MyColors.lightGreyE3Color
: currentIndex == 4
? MyColors.grey3AColor
: cProvider.disbaleChatForThisUser
? MyColors.lightGreyE3Color
: MyColors.grey98Color,
).paddingAll(4),
Consumer<ChatProviderModel>(
builder: (BuildContext cxt, ChatProviderModel data, Widget? child) {
return !checkIfPrivilegedForChat()
? const SizedBox()
: Positioned(
right: 0,
top: 0,
child: Container(
padding: const EdgeInsets.only(left: 4, right: 4),
alignment: Alignment.center,
decoration: BoxDecoration(color: cProvider.disbaleChatForThisUser ? MyColors.pinkDarkColor : MyColors.redColor, borderRadius: BorderRadius.circular(17)),
child: data.chatUConvCounter.toString().toText10(color: Colors.white),
),
);
},
),
],
),
label: LocaleKeys.chat.tr(),
), ),
], ],
currentIndex: currentIndex, currentIndex: currentIndex,
@ -836,15 +806,13 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
unselectedIconTheme: const IconThemeData(color: MyColors.grey98Color, size: 28), unselectedIconTheme: const IconThemeData(color: MyColors.grey98Color, size: 28),
onTap: (int index) { onTap: (int index) {
if (index == 1) { if (index == 1) {
Navigator.pushNamed(context, AppRoutes.mowadhafhi); Navigator.pushNamed(context, AppRoutes.myRequests);
} else if (index == 2) { } else if (index == 2) {
Navigator.pushNamed(context, AppRoutes.workList); Navigator.pushNamed(context, AppRoutes.workList);
} else if (index == 3) { } else if (index == 3) {
Navigator.pushNamed(context, AppRoutes.itemsForSale); Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(LocaleKeys.ticketBalance.tr(), "HMG_TKT_NEW_EIT_SS"));
} else if (index == 4) { } else if (index == 4) {
if (!cProvider.disbaleChatForThisUser && checkIfPrivilegedForChat()) { Navigator.pushNamed(context, AppRoutes.profile);
Navigator.pushNamed(context, AppRoutes.chat);
}
} }
}, },
), ),
@ -867,24 +835,24 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
? 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();
} }
//
void navigateToDetails(OffersListModel offersListModelObj) { // void navigateToDetails(OffersListModel offersListModelObj) {
List<OffersListModel> getOffersDetailList = []; // List<OffersListModel> getOffersDetailList = [];
getOffersDetailList.clear(); // getOffersDetailList.clear();
int counter = 1; // int counter = 1;
//
getOffersDetailList.add(offersListModelObj); // getOffersDetailList.add(offersListModelObj);
//
data.getOffersList.forEach((OffersListModel element) { // data.getOffersList.forEach((OffersListModel element) {
if (counter <= 4) { // if (counter <= 4) {
if (element.offersDiscountId != offersListModelObj.offersDiscountId) { // if (element.offersDiscountId != offersListModelObj.offersDiscountId) {
getOffersDetailList.add(element); // getOffersDetailList.add(element);
counter++; // counter++;
} // }
} // }
}); // });
Navigator.pushNamed(context, AppRoutes.offersAndDiscountsDetails, arguments: getOffersDetailList); // Navigator.pushNamed(context, AppRoutes.offersAndDiscountsDetails, arguments: getOffersDetailList);
} // }
bool checkIfPrivilegedForChat() { bool checkIfPrivilegedForChat() {
for (PrivilegeListModel element in AppState().privilegeListModel!) { for (PrivilegeListModel element in AppState().privilegeListModel!) {

@ -47,7 +47,7 @@ class _MyRequestsState extends State<MyRequests> {
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: AppBarWidget( appBar: AppBarWidget(
context, context,
title: LocaleKeys.concurrentReports, title: LocaleKeys.concurrentReports.tr(),
), ),
body: Column( body: Column(
children: [ children: [

@ -47,7 +47,7 @@ class _NewRequestState extends State<NewRequest> {
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: AppBarWidget( appBar: AppBarWidget(
context, context,
title: LocaleKeys.concurrentReports, title: LocaleKeys.concurrentReports.tr(),
), ),
body: Column( body: Column(
children: [ children: [

@ -574,7 +574,7 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SvgPicture.asset(image, color: Colors.white, alignment: Alignment.topLeft).expanded, SvgPicture.asset(image, color: Colors.white, alignment: Alignment.topLeft, height: 42, ).expanded,
title.toText17(isBold: true, color: Colors.white), title.toText17(isBold: true, color: Colors.white),
], ],
), ),

@ -140,6 +140,7 @@ class _NfcLayoutState extends State<NfcLayout> {
Widget doneNfc() { Widget doneNfc() {
return Container( return Container(
key: ValueKey(2), key: ValueKey(2),
width: double.infinity,
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[

Loading…
Cancel
Save