From 9362859013be51abae21fe160a2cec8b8980199f Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Tue, 31 Dec 2024 17:20:22 +0300 Subject: [PATCH 01/10] CEI notification body added. --- lib/api/my_attendance_api_client.dart | 2 +- lib/api/worklist/worklist_api_client.dart | 14 +++++++++++++ lib/models/generic_response_model.dart | 16 ++++++++------ lib/ui/work_list/worklist_detail_screen.dart | 22 +++++++++++++++++++- 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/lib/api/my_attendance_api_client.dart b/lib/api/my_attendance_api_client.dart index 74e9855..37bf9e8 100644 --- a/lib/api/my_attendance_api_client.dart +++ b/lib/api/my_attendance_api_client.dart @@ -143,7 +143,7 @@ class MyAttendanceApiClient { if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID; return await ApiClient().postJsonForObject((json) { GenericResponseModel responseData = GenericResponseModel.fromJson(json); - return responseData.submitEITTransactionList!; //ESERVICESDV.fromJson(responseData.getDefaultValueList!.toJson()); + return responseData.submitCEITransactionList!; //ESERVICESDV.fromJson(responseData.getDefaultValueList!.toJson()); }, url, postParams); } diff --git a/lib/api/worklist/worklist_api_client.dart b/lib/api/worklist/worklist_api_client.dart index e08d30b..9667961 100644 --- a/lib/api/worklist/worklist_api_client.dart +++ b/lib/api/worklist/worklist_api_client.dart @@ -534,6 +534,20 @@ class WorkListApiClient { }, url, postParams); } + Future?> GetCeiNotificationBody(int? notificationId) async { + String url = "${ApiConsts.erpRest}GET_CEI_NOTIFICATION_BODY"; + Map postParams = { + "P_NOTIFICATION_ID": notificationId, + "P_PAGE_LIMIT": 100, + "P_PAGE_NUM": 1, + }; + postParams.addAll(AppState().postParamsJson); + return await ApiClient().postJsonForObject((json) { + GenericResponseModel responseData = GenericResponseModel.fromJson(json); + return responseData.getCEICollectionNotificationBodyList; + }, url, postParams); + } + Future?> getPhonesNotificationBodyList(int? notificationId) async { String url = "${ApiConsts.erpRest}GET_PHONES_NOTIFICATION_BODY"; Map postParams = { diff --git a/lib/models/generic_response_model.dart b/lib/models/generic_response_model.dart index 4175e7f..e87c3e0 100644 --- a/lib/models/generic_response_model.dart +++ b/lib/models/generic_response_model.dart @@ -184,7 +184,7 @@ class GenericResponseModel { List? getBasicDetColsStructureList; List? getBasicDetDffStructureList; List? getBasicDetNtfBodyList; - List? getCEICollectionNotificationBodyList; + List? getCEICollectionNotificationBodyList; List? getCEIDFFStructureList; List? getCEITransactionList; List? getCcpTransactionsList; @@ -356,7 +356,7 @@ class GenericResponseModel { StartTermApprovalProcessList? startTermApprovalProcessList; SubmitAddressTransaction? submitAddressTransactionList; SubmitBasicDetailsTransactionList? submitBasicDetTransactionList; - String? submitCEITransactionList; + SubmitEITTransactionList? submitCEITransactionList; SubmitCcpTransactionList? submitCcpTransactionList; SubmitContactTransactionList? submitContactTransactionList; SubmitEITTransactionList? submitEITTransactionList; @@ -845,7 +845,9 @@ class GenericResponseModel { }); } - getCEICollectionNotificationBodyList = json['GetCEICollectionNotificationBodyList']; + getCEICollectionNotificationBodyList = json["GetCEICollectionNotificationBodyList"] == null + ? null + : List.from(json["GetCEICollectionNotificationBodyList"].map((x) => GetEitCollectionNotificationBodyList.fromJson(x))); if (json['GetCEIDFFStructureList'] != null) { getCEIDFFStructureList = []; @@ -1378,7 +1380,7 @@ class GenericResponseModel { submitAddressTransactionList = json['SubmitAddressTransactionList'] != null ? SubmitAddressTransaction.fromJson(json['SubmitAddressTransactionList']) : null; submitBasicDetTransactionList = json['SubmitBasicDetTransactionList'] != null ? SubmitBasicDetailsTransactionList.fromJson(json['SubmitBasicDetTransactionList']) : null; - submitCEITransactionList = json['SubmitCEITransactionList']; + submitCEITransactionList = json['SubmitCEITransactionList'] != null ? SubmitEITTransactionList.fromJson(json['SubmitCEITransactionList']) : null; submitCcpTransactionList = json['SubmitCcpTransactionList'] != null ? new SubmitCcpTransactionList.fromJson(json['SubmitCcpTransactionList']) : null; submitContactTransactionList = json['SubmitContactTransactionList'] != null ? SubmitContactTransactionList.fromJson(json['SubmitContactTransactionList']) : null; submitEITTransactionList = json['SubmitEITTransactionList'] != null ? SubmitEITTransactionList.fromJson(json['SubmitEITTransactionList']) : null; @@ -1553,10 +1555,8 @@ class GenericResponseModel { if (this.getBasicDetNtfBodyList != null) { data['GetBasicDetNtfBodyList'] = this.getBasicDetNtfBodyList!.map((v) => v.toJson()).toList(); } - data['GetCEICollectionNotificationBodyList'] = this.getCEICollectionNotificationBodyList; - if (this.getCEIDFFStructureList != null) { data['GetCEIDFFStructureList'] = this.getCEIDFFStructureList!.map((v) => v.toJson()).toList(); } @@ -1855,6 +1855,10 @@ class GenericResponseModel { } data['SubmitCEITransactionList'] = this.submitCEITransactionList; + + if (this.submitCEITransactionList != null) { + data['SubmitCEITransactionList'] = this.submitCEITransactionList!.toJson(); + } if (this.submitCcpTransactionList != null) { data['SubmitCcpTransactionList'] = this.submitCcpTransactionList!.toJson(); } diff --git a/lib/ui/work_list/worklist_detail_screen.dart b/lib/ui/work_list/worklist_detail_screen.dart index ee595d1..69c669f 100644 --- a/lib/ui/work_list/worklist_detail_screen.dart +++ b/lib/ui/work_list/worklist_detail_screen.dart @@ -142,7 +142,9 @@ class _WorkListDetailScreenState extends State { if (workListData!.iTEMTYPE == "HRSSA") { if (workListData!.rEQUESTTYPE == "EIT") { getEitNotificationBody(); - } else if (workListData!.rEQUESTTYPE == "PHONE_NUMBERS") { + } else if (workListData!.rEQUESTTYPE == "CEI") { + getCEINotificationBody(); + }else if (workListData!.rEQUESTTYPE == "PHONE_NUMBERS") { getPhonesNotificationBody(); } else if (workListData!.rEQUESTTYPE == "BASIC_DETAILS") { getBasicDetNtfBody(); @@ -760,6 +762,24 @@ class _WorkListDetailScreenState extends State { } } + void getCEINotificationBody() async { + try { + if (apiCallCount == 0) Utils.showLoading(context); + apiCallCount++; + getEitCollectionNotificationBodyList!.clear(); + getEitCollectionNotificationBodyList = await WorkListApiClient().GetCeiNotificationBody(workListData!.nOTIFICATIONID); + apiCallCount--; + if (apiCallCount == 0) { + Utils.hideLoading(context); + setState(() {}); + } + } catch (ex) { + apiCallCount--; + Utils.hideLoading(context); + Utils.handleException(ex, context, null); + } + } + void getEitNotificationBody() async { try { if (apiCallCount == 0) Utils.showLoading(context); From c35074576a8c2c4d04b21a0cc9cee39b9697bf20 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Thu, 30 Jan 2025 11:41:44 +0300 Subject: [PATCH 02/10] offer and discount, do not show if api have issue. --- lib/classes/consts.dart | 6 +- lib/provider/dashboard_provider_model.dart | 4 +- lib/ui/landing/dashboard_screen.dart | 188 +++++++++++---------- 3 files changed, 102 insertions(+), 96 deletions(-) diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index 6442b88..fea9b75 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -9,9 +9,9 @@ class ApiConsts { // static String baseUrl = "https://webservices.hmg.com"; // PreProd // static String baseUrl = "https://hmgwebservices.com"; // Live server - // static String baseUrl = "https://mohemm.hmg.com"; // New Live server - - static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver + static String baseUrl = "https://mohemm.hmg.com"; // New Live server + // + // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver // static String baseUrl = "http://10.20.200.111:1010/"; // static String baseUrl = "https://webservices.hmg.com"; // PreProd diff --git a/lib/provider/dashboard_provider_model.dart b/lib/provider/dashboard_provider_model.dart index 0e18544..e3f6511 100644 --- a/lib/provider/dashboard_provider_model.dart +++ b/lib/provider/dashboard_provider_model.dart @@ -253,8 +253,10 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { notifyListeners(); } catch (ex) { // Utils.hideLoading(context); + getOffersList=[]; + isOffersLoading = false; notifyListeners(); - Utils.handleException(ex, context, null); + // Utils.handleException(ex, context, null); } } diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index 333d271..4448ad1 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -3,7 +3,6 @@ import 'dart:io'; import 'dart:ui' as ui; import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -421,103 +420,108 @@ class _DashboardScreenState extends State with WidgetsBindingOb ), ], ).paddingOnly(left: 21, right: 21, top: 7, bottom: 21), - Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - LocaleKeys.offers.tr().toText12(), - Row( - children: [ - LocaleKeys.discounts.tr().toText24(isBold: true), - 6.width, - Container( - padding: const EdgeInsets.only(left: 8, right: 8), - decoration: BoxDecoration( - color: MyColors.yellowColor, - borderRadius: BorderRadius.circular(10), - ), - child: LocaleKeys.newString.tr().toText10(isBold: true)), - ], - ), - ], + Consumer(builder: (BuildContext context, DashboardProviderModel model, Widget? child) { + if (!model.isOffersLoading && model.getOffersList.isEmpty) { + return const SizedBox(); + } + return Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + LocaleKeys.offers.tr().toText12(), + Row( + children: [ + LocaleKeys.discounts.tr().toText24(isBold: true), + 6.width, + Container( + padding: const EdgeInsets.only(left: 8, right: 8), + decoration: BoxDecoration( + color: MyColors.yellowColor, + borderRadius: BorderRadius.circular(10), + ), + child: LocaleKeys.newString.tr().toText10(isBold: true)), + ], + ), + ], + ), ), - ), - LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true).onPress(() { - Navigator.pushNamed(context, AppRoutes.offersAndDiscounts); - }) - ], - ).paddingOnly(left: 21, right: 21), - Consumer( - builder: (BuildContext context, DashboardProviderModel model, Widget? child) { - return SizedBox( - height: 103 + 33, - child: ListView.separated( - shrinkWrap: true, - physics: const BouncingScrollPhysics(), - padding: const EdgeInsets.only(left: 21, right: 21, top: 13), - scrollDirection: Axis.horizontal, - itemBuilder: (BuildContext cxt, int index) { - return model.isOffersLoading - ? const OffersShimmerWidget() - : InkWell( - onTap: () { - navigateToDetails(data.getOffersList[index]); - }, - child: SizedBox( - width: 73, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: 73, - height: 73, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: const BorderRadius.all( - Radius.circular(100), - ), - border: Border.all(color: MyColors.lightGreyE3Color, width: 1), - ), - child: ClipRRect( - borderRadius: const BorderRadius.all( - Radius.circular(50), + LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true).onPress(() { + Navigator.pushNamed(context, AppRoutes.offersAndDiscounts); + }) + ], + ).paddingOnly(left: 21, right: 21), + Consumer( + builder: (BuildContext context, DashboardProviderModel model, Widget? child) { + return SizedBox( + height: 103 + 33, + child: ListView.separated( + shrinkWrap: true, + physics: const BouncingScrollPhysics(), + padding: const EdgeInsets.only(left: 21, right: 21, top: 13), + scrollDirection: Axis.horizontal, + itemBuilder: (BuildContext cxt, int index) { + return model.isOffersLoading + ? const OffersShimmerWidget() + : InkWell( + onTap: () { + navigateToDetails(data.getOffersList[index]); + }, + child: SizedBox( + width: 73, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: 73, + height: 73, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: const BorderRadius.all( + Radius.circular(100), + ), + border: Border.all(color: MyColors.lightGreyE3Color, width: 1), ), - child: Hero( - tag: "ItemImage" + data.getOffersList[index].offersDiscountId.toString()!, - transitionOnUserGestures: true, - child: Image.network( - data.getOffersList[index].logo ?? "", - fit: BoxFit.contain, + child: ClipRRect( + borderRadius: const BorderRadius.all( + Radius.circular(50), + ), + child: Hero( + tag: "ItemImage" + data.getOffersList[index].offersDiscountId.toString()!, + transitionOnUserGestures: true, + child: Image.network( + data.getOffersList[index].logo ?? "", + fit: BoxFit.contain, + ), ), ), ), - ), - 4.height, - Expanded( - child: AppState().isArabic(context) - ? data.getOffersList[index].titleAr!.toText12(isCenter: true, maxLine: 1) - : data.getOffersList[index].titleEn!.toText12(isCenter: true, maxLine: 1), - ), - ], + 4.height, + Expanded( + child: AppState().isArabic(context) + ? 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, - itemCount: 9), - ); - }, - ), - ], - ), + ); + }, + separatorBuilder: (BuildContext cxt, int index) => 8.width, + itemCount: 9), + ); + }, + ), + ], + ); + }), Container( width: double.infinity, padding: const EdgeInsets.only(top: 31), From a33da491f96cb2e709abc8b15f81334a902ee93e Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Thu, 30 Jan 2025 15:14:05 +0300 Subject: [PATCH 03/10] description format section seperated in itg forms --- .../request_detail_fragment.dart | 94 ++++++++++++------- lib/widgets/item_detail_view_widget.dart | 8 +- 2 files changed, 64 insertions(+), 38 deletions(-) diff --git a/lib/ui/work_list/itg_fragments/request_detail_fragment.dart b/lib/ui/work_list/itg_fragments/request_detail_fragment.dart index 83f574f..ba67ba4 100644 --- a/lib/ui/work_list/itg_fragments/request_detail_fragment.dart +++ b/lib/ui/work_list/itg_fragments/request_detail_fragment.dart @@ -69,46 +69,70 @@ class RequestDetailFragment extends StatelessWidget { ); } - Widget detailView(List fields) { + Widget detailView(List fieldsF) { + List fields = List.from(fieldsF); + bool isOdd = false; if (fields.length % 2 != 0) { isOdd = true; fields.add(new Fields()); } - return GridView.builder( - itemCount: fields.length, - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemBuilder: (context, index) { - if (fields[index].value == null) { - return ItemDetailViewGridItem( - index, - fields[index].title, - fields[index].multipleValue?.join(", ") ?? "", - isNeedToShowEmptyDivider: (fields.length == index + 1) - ? isOdd - ? true - : false - : false, - type: fields[index].type, - ); - } - return ItemDetailViewGridItem( - index, - fields[index].title, - fields[index].value ?? "", - isNeedToShowEmptyDivider: (fields.length == index + 1) - ? isOdd - ? true - : false - : false, - type: fields[index].type, - ); - }, - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, - childAspectRatio: (itemWidth / itemHeight), - ), + + int descriptionFormatIndex = fields.indexWhere((element) => element.title == "Description Format" || element.title == "Description Format"); // todo add arabic in future + Widget? descriptionFormatView; + if (descriptionFormatIndex >= 0) { + Fields descriptionFormat = fields[descriptionFormatIndex]; + fields.removeAt(descriptionFormatIndex); + + descriptionFormatView = ItemDetailViewGridItem( + 2, + descriptionFormat.title, + descriptionFormat.value == null ? (descriptionFormat.multipleValue?.join(", ") ?? "") : descriptionFormat.value ?? "", + type: descriptionFormat.type, + maxLine: 0, + ); + } + + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + GridView.builder( + itemCount: fields.length, + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemBuilder: (context, index) { + if (fields[index].value == null) { + return ItemDetailViewGridItem( + index, + fields[index].title, + fields[index].multipleValue?.join(", ") ?? "", + isNeedToShowEmptyDivider: (fields.length == index + 1) + ? isOdd + ? true + : false + : false, + type: fields[index].type, + ); + } + return ItemDetailViewGridItem( + index, + fields[index].title, + fields[index].value ?? "", + isNeedToShowEmptyDivider: (fields.length == index + 1) + ? isOdd + ? true + : false + : false, + type: fields[index].type, + ); + }, + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + childAspectRatio: (itemWidth / itemHeight), + ), + ), + if (descriptionFormatView != null) descriptionFormatView, + ], ).objectContainerView(); return ListView.separated( shrinkWrap: true, diff --git a/lib/widgets/item_detail_view_widget.dart b/lib/widgets/item_detail_view_widget.dart index f6797e8..a98b066 100644 --- a/lib/widgets/item_detail_view_widget.dart +++ b/lib/widgets/item_detail_view_widget.dart @@ -52,8 +52,9 @@ class ItemDetailViewGridItem extends StatelessWidget { final String? value; final String? type; final bool isNeedToShowEmptyDivider; + final int maxLine; - ItemDetailViewGridItem(this.index, this.title, this.value, {Key? key, this.isNeedToShowEmptyDivider = false, this.type = ""}) : super(key: key); + ItemDetailViewGridItem(this.index, this.title, this.value, {Key? key, this.isNeedToShowEmptyDivider = false, this.type = "", this.maxLine = 6}) : super(key: key); @override Widget build(BuildContext context) { @@ -76,10 +77,11 @@ class ItemDetailViewGridItem extends StatelessWidget { ), ), child: isNeedToShowEmptyDivider - ? Container() + ? SizedBox() : Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, children: [ title != null ? Flexible(child: "$title:".toText12Auto(isBold: true, color: const Color(0xff2BB8A6))) : Container(), 4.width, @@ -87,7 +89,7 @@ class ItemDetailViewGridItem extends StatelessWidget { ? type!.toLowerCase() == "table" ? getStringFromJSON(value!) // : Flexible(child: (value!.isEmpty ? "--" : value).toString().toText12Auto(color: MyColors.normalTextColor, maxLine: 5)) - : (value!.isEmpty ? "--" : value).toString().toText12Auto(color: MyColors.normalTextColor, maxLine: 6) + : (value!.isEmpty ? "--" : value).toString().toText12Auto(color: MyColors.normalTextColor, maxLine: maxLine) : Container(), ], ), From 6e3fc55fde6d49b465e28209dbf653d72f49e4b4 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Tue, 4 Feb 2025 11:06:03 +0300 Subject: [PATCH 04/10] event activity added - cont --- lib/api/dashboard_api_client.dart | 10 + lib/classes/consts.dart | 4 +- lib/classes/date_uitl.dart | 2 +- lib/models/dashboard/event_activity.dart | 77 +++ lib/models/generic_response_model.dart | 5 + lib/provider/dashboard_provider_model.dart | 28 +- lib/ui/landing/dashboard_screen.dart | 11 + lib/ui/landing/event_activity_banner.dart | 578 +++++++++++++++++++ lib/widgets/glowy_borders/glowy_borders.dart | 150 +++++ 9 files changed, 859 insertions(+), 6 deletions(-) create mode 100644 lib/models/dashboard/event_activity.dart create mode 100644 lib/ui/landing/event_activity_banner.dart create mode 100644 lib/widgets/glowy_borders/glowy_borders.dart diff --git a/lib/api/dashboard_api_client.dart b/lib/api/dashboard_api_client.dart index bc0fece..89e7d48 100644 --- a/lib/api/dashboard_api_client.dart +++ b/lib/api/dashboard_api_client.dart @@ -105,6 +105,16 @@ class DashboardApiClient { }, url, postParams); } + Future getEventActivity() async { + String url = "${ApiConsts.erpRest}Get_EventActivity"; + Map postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"}; + postParams.addAll(AppState().postParamsJson); + return await ApiClient().postJsonForObject((json) { + GenericResponseModel responseData = GenericResponseModel.fromJson(json); + return responseData; + }, url, postParams); + } + //Mark Attendance Future markAttendance({String lat = "0", String? long = "0", required int pointType, String nfcValue = "", bool isGpsRequired = false, String QRValue = "", String payrollCode = ""}) async { String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC"; diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index fea9b75..c2772b8 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -9,9 +9,9 @@ class ApiConsts { // static String baseUrl = "https://webservices.hmg.com"; // PreProd // static String baseUrl = "https://hmgwebservices.com"; // Live server - static String baseUrl = "https://mohemm.hmg.com"; // New Live server + // static String baseUrl = "https://mohemm.hmg.com"; // New Live server // - // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver + static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver // static String baseUrl = "http://10.20.200.111:1010/"; // static String baseUrl = "https://webservices.hmg.com"; // PreProd diff --git a/lib/classes/date_uitl.dart b/lib/classes/date_uitl.dart index e27843c..53b6525 100644 --- a/lib/classes/date_uitl.dart +++ b/lib/classes/date_uitl.dart @@ -7,7 +7,7 @@ class DateUtil { /// static DateTime convertStringToDateMarathon(String date) { - // /Date(1585774800000+0300)/ + // return DateTime(2025, 2, 5); if (date != null) { const start = "/Date("; const end = "+0300)"; diff --git a/lib/models/dashboard/event_activity.dart b/lib/models/dashboard/event_activity.dart new file mode 100644 index 0000000..e7e821c --- /dev/null +++ b/lib/models/dashboard/event_activity.dart @@ -0,0 +1,77 @@ +class EventActivityList { + EventActivityList({ + required this.id, + required this.titleEn, + required this.titleAr, + required this.shortDescEn, + required this.shortDescAr, + required this.longDescEn, + required this.longDescAr, + required this.url, + required this.startOn, + required this.endOn, + required this.channel, + required this.isActive, + required this.createdBy, + required this.createdOn, + required this.modifiedBy, + required this.modifiedOn, + }); + + final int? id; + final String? titleEn; + final String? titleAr; + final String? shortDescEn; + final String? shortDescAr; + final String? longDescEn; + final String? longDescAr; + final String? url; + final String? startOn; + final String? endOn; + final int? channel; + final bool? isActive; + final int? createdBy; + final String? createdOn; + final String? modifiedBy; + final String? modifiedOn; + + factory EventActivityList.fromJson(Map json) { + return EventActivityList( + id: json["ID"], + titleEn: json["TitleEn"], + titleAr: json["TitleAr"], + shortDescEn: json["ShortDescEn"], + shortDescAr: json["ShortDescAr"], + longDescEn: json["LongDescEn"], + longDescAr: json["LongDescAr"], + url: json["URL"], + startOn: json["StartOn"], + endOn: json["EndOn"], + channel: json["Channel"], + isActive: json["IsActive"], + createdBy: json["CreatedBy"], + createdOn: json["CreatedOn"], + modifiedBy: json["ModifiedBy"], + modifiedOn: json["ModifiedOn"], + ); + } + + Map toJson() => { + "ID": id, + "TitleEn": titleEn, + "TitleAr": titleAr, + "ShortDescEn": shortDescEn, + "ShortDescAr": shortDescAr, + "LongDescEn": longDescEn, + "LongDescAr": longDescAr, + "URL": url, + "StartOn": startOn, + "EndOn": endOn, + "Channel": channel, + "IsActive": isActive, + "CreatedBy": createdBy, + "CreatedOn": createdOn, + "ModifiedBy": modifiedBy, + "ModifiedOn": modifiedOn, + }; +} diff --git a/lib/models/generic_response_model.dart b/lib/models/generic_response_model.dart index e87c3e0..ba48836 100644 --- a/lib/models/generic_response_model.dart +++ b/lib/models/generic_response_model.dart @@ -1,6 +1,7 @@ import 'package:mohem_flutter_app/models/add_att_success_list_model.dart'; import 'package:mohem_flutter_app/models/add_attachment_list_model.dart'; import 'package:mohem_flutter_app/models/basic_member_information_model.dart'; +import 'package:mohem_flutter_app/models/dashboard/event_activity.dart'; import 'package:mohem_flutter_app/models/dashboard/get_accrual_balances_list_model.dart'; import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart'; import 'package:mohem_flutter_app/models/dashboard/get_open_missing_swipes_list_model.dart'; @@ -214,6 +215,7 @@ class GenericResponseModel { List? getItemTypesList; List? getLookupValuesList; List? getMenuEntriesList; + List? getEventActivityList; List? getMoItemHistoryList; List? getMoNotificationBodyList; List? getNotificationButtonsList; @@ -487,6 +489,7 @@ class GenericResponseModel { this.getItemTypesList, this.getLookupValuesList, this.getMenuEntriesList, + this.getEventActivityList, this.getMoItemHistoryList, this.getMoNotificationBodyList, this.getNotificationButtonsList, @@ -974,6 +977,7 @@ class GenericResponseModel { getItemTypesList = json['GetItemTypesList']; getLookupValuesList = json['GetLookupValuesList']; getMenuEntriesList = json["GetMenuEntriesList"] == null ? null : List.from(json["GetMenuEntriesList"].map((x) => GetMenuEntriesList.fromJson(x))); + getEventActivityList = json["EventActivityList"] == null ? null : List.from(json["EventActivityList"].map((x) => EventActivityList.fromJson(x))); if (json['GetMoItemHistoryList'] != null) { getMoItemHistoryList = []; json['GetMoItemHistoryList'].forEach((v) { @@ -1630,6 +1634,7 @@ class GenericResponseModel { data['GetItemTypesList'] = this.getItemTypesList; data['GetLookupValuesList'] = this.getLookupValuesList; data['GetMenuEntriesList'] = this.getMenuEntriesList; + data['EventActivityList'] = this.getEventActivityList; if (this.getMoItemHistoryList != null) { data['GetMoItemHistoryList'] = this.getMoItemHistoryList!.map((v) => v.toJson()).toList(); } diff --git a/lib/provider/dashboard_provider_model.dart b/lib/provider/dashboard_provider_model.dart index e3f6511..9b57133 100644 --- a/lib/provider/dashboard_provider_model.dart +++ b/lib/provider/dashboard_provider_model.dart @@ -9,6 +9,7 @@ import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/main.dart'; import 'package:mohem_flutter_app/models/dashboard/drawer_menu_item_model.dart'; +import 'package:mohem_flutter_app/models/dashboard/event_activity.dart'; import 'package:mohem_flutter_app/models/dashboard/get_accrual_balances_list_model.dart'; import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart'; import 'package:mohem_flutter_app/models/dashboard/get_open_notifications_list.dart'; @@ -20,7 +21,6 @@ import 'package:mohem_flutter_app/models/dashboard/mohemm_itg_pending_task_respo import 'package:mohem_flutter_app/models/generic_response_model.dart'; import 'package:mohem_flutter_app/models/itg/itg_response_model.dart'; import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart'; -import 'package:mohem_flutter_app/ui/landing/dashboard_screen.dart'; import 'package:mohem_flutter_app/widgets/dialogs/confirm_dialog.dart'; /// Mix-in [DiagnosticableTreeMixin] to have access to [debugFillProperties] for the devtool @@ -50,9 +50,12 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { //Menu Entries bool isServicesMenusLoading = true; + bool isEventLoadingLoading = true; List? homeMenus; List? getMenuEntriesList; + EventActivityList? eventActivity; + //Offers And Discounts bool isOffersLoading = true; List getOffersList = []; @@ -99,6 +102,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { ticketBalance = 0; isServicesMenusLoading = true; + isEventLoadingLoading = true; homeMenus = null; getMenuEntriesList = null; isOffersLoading = true; @@ -253,10 +257,28 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { notifyListeners(); } catch (ex) { // Utils.hideLoading(context); - getOffersList=[]; + getOffersList = []; isOffersLoading = false; notifyListeners(); - // Utils.handleException(ex, context, null); + // Utils.handleException(ex, context, null); + } + } + + void fetchEventActivity() async { + try { + GenericResponseModel? genericResponseModel = await DashboardApiClient().getEventActivity(); + List eventList = (genericResponseModel!.getEventActivityList ?? []); + if (eventList.isNotEmpty) { + eventActivity = eventList.first; + } + + isEventLoadingLoading = false; + notifyListeners(); + } catch (ex) { + logger.wtf(ex); + isEventLoadingLoading = false; + notifyListeners(); + Utils.handleException(ex, null, null); } } diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index 4448ad1..67e748c 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -21,6 +21,7 @@ import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.da import 'package:mohem_flutter_app/models/privilege_list_model.dart'; import 'package:mohem_flutter_app/provider/chat_provider_model.dart'; 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/widget/app_drawer.dart'; import 'package:mohem_flutter_app/ui/landing/widget/menus_widget.dart'; import 'package:mohem_flutter_app/ui/landing/widget/services_widget.dart'; @@ -149,6 +150,7 @@ class _DashboardScreenState extends State with WidgetsBindingOb data.fetchMissingSwipe(context); data.fetchLeaveTicketBalance(context, DateTime.now()); data.fetchMenuEntries(); + data.fetchEventActivity(); data.getCategoryOffersListAPI(context); marathonProvider.getMarathonDetailsFromApi(); marathonProvider.getMarathonTutorial(); @@ -420,6 +422,7 @@ class _DashboardScreenState extends State with WidgetsBindingOb ), ], ).paddingOnly(left: 21, right: 21, top: 7, bottom: 21), + eventActivityWidget(context), Consumer(builder: (BuildContext context, DashboardProviderModel model, Widget? child) { if (!model.isOffersLoading && model.getOffersList.isEmpty) { return const SizedBox(); @@ -706,6 +709,14 @@ class _DashboardScreenState extends State with WidgetsBindingOb ); } + Widget eventActivityWidget(BuildContext context) { + return (context.watch().isEventLoadingLoading) + ? const MarathonBannerShimmer().paddingOnly(left: 21, right: 21, bottom: 21, top: 0) + : context.watch().eventActivity == null + ? const SizedBox() + : const EventActivityBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 0); + } + void navigateToDetails(OffersListModel offersListModelObj) { List getOffersDetailList = []; getOffersDetailList.clear(); diff --git a/lib/ui/landing/event_activity_banner.dart b/lib/ui/landing/event_activity_banner.dart new file mode 100644 index 0000000..83c58dd --- /dev/null +++ b/lib/ui/landing/event_activity_banner.dart @@ -0,0 +1,578 @@ +import 'dart:math' as math; + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:mohem_flutter_app/app_state/app_state.dart'; +import 'package:mohem_flutter_app/classes/colors.dart'; +import 'package:mohem_flutter_app/classes/date_uitl.dart'; +import 'package:mohem_flutter_app/classes/decorations_helper.dart'; +import 'package:mohem_flutter_app/config/routes.dart'; +import 'package:mohem_flutter_app/extensions/int_extensions.dart'; +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/main.dart'; +import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; +import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart'; +import 'package:mohem_flutter_app/ui/marathon/widgets/countdown_timer_main_screen.dart'; +import 'package:mohem_flutter_app/widgets/glowy_borders/glowy_borders.dart'; +import 'package:provider/provider.dart'; + +// It is used to pass a dummy time to test Marathon +int dummyTime = DateTime.now().millisecondsSinceEpoch + 8690; + +class EventActivityBanner extends StatelessWidget { + const EventActivityBanner({Key? key}) : super(key: key); + + // Widget getUnPrivilegedMarathon(BuildContext context) { + // return Container( + // decoration: MyDecorations.shadowDecoration, + // height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11, + // clipBehavior: Clip.antiAlias, + // child: Stack( + // children: [ + // Transform( + // alignment: Alignment.center, + // transform: Matrix4.rotationY( + // AppState().isArabic(context) ? math.pi : 0, + // ), + // child: SvgPicture.asset( + // "assets/images/marathon_banner_bg.svg", + // fit: BoxFit.fill, + // width: double.infinity, + // ), + // ), + // AppState().isArabic(context) + // ? Positioned( + // right: -15, + // top: -10, + // child: Transform.rotate( + // angle: 10, + // child: Container( + // width: isTablet ? 70 : 65, + // height: isTablet ? 40 : 32, + // color: MyColors.darkDigitColor, + // ), + // ), + // ) + // : Positioned( + // left: -20, + // top: -10, + // child: Transform.rotate( + // angle: 15, + // child: Container( + // width: isTablet ? 70 : 65, + // height: isTablet ? 40 : 32, + // color: MyColors.darkDigitColor, + // ), + // ), + // ), + // SizedBox( + // width: double.infinity, + // height: double.infinity, + // child: Row( + // children: [ + // const Expanded( + // flex: 3, + // child: SizedBox( + // width: double.infinity, + // height: double.infinity, + // ), + // ), + // Expanded( + // flex: AppState().isArabic(context) ? 4 : 5, + // child: SizedBox( + // width: double.infinity, + // height: double.infinity, + // child: Row( + // mainAxisAlignment: MainAxisAlignment.start, + // children: [ + // Column( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + // children: [ + // AppState().isArabic(context) ? 0.height : 5.height, + // Text( + // LocaleKeys.getReadyForContest.tr(), + // style: TextStyle( + // fontSize: isTablet ? 20 : 11, + // fontStyle: FontStyle.italic, + // fontWeight: FontWeight.w600, + // color: MyColors.white.withOpacity(0.83), + // letterSpacing: -0.4, + // ), + // ), + // Text( + // LocaleKeys.brainMarathon.tr(), + // style: TextStyle( + // fontStyle: FontStyle.italic, + // fontSize: isTablet ? 30 : 19, + // fontWeight: FontWeight.bold, + // color: MyColors.white.withOpacity(0.83), + // height: 32 / 22, + // ), + // ), + // ], + // ).paddingOnly( + // left: AppState().isArabic(context) ? 12 : 3, + // right: AppState().isArabic(context) ? 3 : 12, + // ) + // ], + // ), + // ), + // ), + // ], + // ), + // ), + // AppState().isArabic(context) + // ? Align( + // alignment: Alignment.topRight, + // child: SizedBox( + // height: isTablet ? 30 : 20, + // width: isTablet ? 45 : 35, + // child: Transform.rotate( + // angle: math.pi / 4.5, + // child: Text( + // LocaleKeys.brainMarathon.tr(), + // textAlign: TextAlign.center, + // maxLines: 2, + // style: TextStyle( + // color: MyColors.white, + // fontWeight: FontWeight.bold, + // fontSize: isTablet ? 8 : 6, + // height: 1.2, + // ), + // ), + // ), + // ), + // ).paddingOnly(top: 5) + // : Align( + // alignment: Alignment.topLeft, + // child: SizedBox( + // height: isTablet ? 30 : 20, + // width: isTablet ? 45 : 35, + // child: Transform.rotate( + // angle: -math.pi / 4.5, + // child: Text( + // LocaleKeys.brainMarathon.tr(), + // textAlign: TextAlign.center, + // maxLines: 2, + // style: TextStyle( + // color: MyColors.kWhiteColor, + // fontWeight: FontWeight.bold, + // fontSize: isTablet ? 8 : 6, + // height: 1.2, + // ), + // ), + // ), + // ), + // ).paddingOnly(top: 5), + // Container( + // height: double.infinity, + // width: double.infinity, + // color: Colors.black.withOpacity(0.6), + // child: const Icon( + // Icons.lock_rounded, + // color: MyColors.lightGreyIconColor, + // ), + // ), + // ], + // ), + // ); + // } + + Widget getNoUpcomingMarathonWidget(BuildContext context) { + return Container( + decoration: MyDecorations.shadowDecoration, + height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11, + clipBehavior: Clip.antiAlias, + child: Stack( + children: [ + Transform( + alignment: Alignment.center, + transform: Matrix4.rotationY( + AppState().isArabic(context) ? math.pi : 0, + ), + child: SvgPicture.asset( + "assets/images/marathon_banner_bg.svg", + fit: BoxFit.fill, + width: double.infinity, + ), + ), + AppState().isArabic(context) + ? Positioned( + right: -15, + top: -10, + child: Transform.rotate( + angle: 10, + child: Container( + width: isTablet ? 70 : 65, + height: isTablet ? 40 : 32, + color: MyColors.darkDigitColor, + ), + ), + ) + : Positioned( + left: -20, + top: -10, + child: Transform.rotate( + angle: 15, + child: Container( + width: isTablet ? 70 : 65, + height: isTablet ? 40 : 32, + color: MyColors.darkDigitColor, + ), + ), + ), + SizedBox( + width: double.infinity, + height: double.infinity, + child: Row( + children: [ + const Expanded( + flex: 3, + child: SizedBox( + width: double.infinity, + height: double.infinity, + ), + ), + Expanded( + flex: AppState().isArabic(context) ? 4 : 5, + child: SizedBox( + width: double.infinity, + height: double.infinity, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + AppState().isArabic(context) ? 0.height : 5.height, + Text( + LocaleKeys.noUpcoming.tr(), + style: TextStyle( + fontSize: isTablet ? 20 : 11, + fontStyle: FontStyle.italic, + fontWeight: FontWeight.w600, + color: MyColors.white.withOpacity(0.83), + letterSpacing: -0.4, + ), + ), + Text( + LocaleKeys.brainMarathon.tr(), + style: TextStyle( + fontStyle: FontStyle.italic, + fontSize: isTablet ? 30 : 19, + fontWeight: FontWeight.bold, + color: MyColors.white.withOpacity(0.83), + height: 32 / 22, + ), + ), + Text( + LocaleKeys.youCanPlayDemo.tr(), + style: TextStyle( + fontSize: isTablet ? 20 : 11, + fontStyle: FontStyle.italic, + fontWeight: FontWeight.w600, + color: MyColors.white.withOpacity(0.83), + letterSpacing: -0.4, + ), + ), + ], + ).paddingOnly( + left: AppState().isArabic(context) ? 12 : 3, + right: AppState().isArabic(context) ? 3 : 12, + ) + ], + ), + ), + ), + ], + ), + ), + AppState().isArabic(context) + ? Align( + alignment: Alignment.topRight, + child: SizedBox( + height: isTablet ? 30 : 20, + width: isTablet ? 45 : 35, + child: Transform.rotate( + angle: math.pi / 4.5, + child: Text( + LocaleKeys.brainMarathon.tr(), + textAlign: TextAlign.center, + maxLines: 2, + style: TextStyle( + color: MyColors.white, + fontWeight: FontWeight.bold, + fontSize: isTablet ? 8 : 6, + height: 1.2, + ), + ), + ), + ), + ).paddingOnly(top: 5) + : Align( + alignment: Alignment.topLeft, + child: SizedBox( + height: isTablet ? 30 : 20, + width: isTablet ? 45 : 35, + child: Transform.rotate( + angle: -math.pi / 4.5, + child: Text( + LocaleKeys.brainMarathon.tr(), + textAlign: TextAlign.center, + maxLines: 2, + style: TextStyle( + color: MyColors.kWhiteColor, + fontWeight: FontWeight.bold, + fontSize: isTablet ? 8 : 6, + height: 1.2, + ), + ), + ), + ), + ).paddingOnly(top: 5), + ], + ), + ).onPress(() { + Navigator.pushNamed(context, AppRoutes.marathonIntroScreen); + }); + } + + @override + Widget build(BuildContext context) { + DashboardProviderModel dashboardProvider = context.read(); + + return Container( + // decoration: BoxDecoration( + // color: MyColors.kWhiteColor, + // borderRadius: BorderRadius.circular(8), + // boxShadow: [ + // BoxShadow( + // color: const Color(0xff000000).withOpacity(.05), + // blurRadius: 26, + // offset: const Offset(0, -3), + // ), + // ], + // ), + height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11, + child: AnimatedGradientBorder( + borderSize: 3, + stretchAlongAxis: true, + animationTime: 2, + stretchAxis: Axis.vertical, + gradientColors: const [ + Color(0xff0E5A64), + Color(0xff0E5A64), + Color(0xff0E5A64), + Color(0xff91C481), + ], + borderRadius: BorderRadius.circular(10), + child: Container( + decoration: BoxDecoration( + color: const Color(0xff0E5A64), + borderRadius: BorderRadius.circular(8), + ), + // height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11, + + child: Stack( + children: [ + // Transform( + // alignment: Alignment.center, + // transform: Matrix4.rotationY( + // AppState().isArabic(context) ? math.pi : 0, + // ), + // child: SvgPicture.asset( + // "assets/images/marathon_banner_bg.svg", + // fit: BoxFit.fill, + // width: double.infinity, + // ), + // ), + // AppState().isArabic(context) + // ? Positioned( + // right: -15, + // top: -10, + // child: Transform.rotate( + // angle: 10, + // child: Container( + // width: isTablet ? 70 : 65, + // height: isTablet ? 40 : 32, + // color: MyColors.darkDigitColor, + // ), + // ), + // ) + // : Positioned( + // left: -20, + // top: -10, + // child: Transform.rotate( + // angle: 15, + // child: Container( + // width: isTablet ? 70 : 65, + // height: isTablet ? 40 : 32, + // color: MyColors.darkDigitColor, + // ), + // ), + // ), + SizedBox( + width: double.infinity, + height: double.infinity, + child: Row( + children: [ + const Expanded( + flex: 3, + child: SizedBox( + width: double.infinity, + height: double.infinity, + ), + ), + Expanded( + flex: AppState().isArabic(context) ? 4 : 5, + child: SizedBox( + width: double.infinity, + height: double.infinity, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + AppState().isArabic(context) ? 0.height : 5.height, + Text( + LocaleKeys.getReadyForContest.tr(), + style: TextStyle( + fontSize: isTablet ? 20 : 11, + fontStyle: FontStyle.italic, + fontWeight: FontWeight.w600, + color: MyColors.white.withOpacity(0.83), + letterSpacing: -0.4, + ), + ), + Flexible( + child: Text( + displayLocalizedContent( + isPhoneLangArabic: AppState().isArabic(context), + selectedLanguage: 3, + englishContent: dashboardProvider.eventActivity?.titleEn ?? "", + arabicContent: dashboardProvider.eventActivity?.titleAr ?? "", + ), + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontStyle: FontStyle.italic, + fontSize: isTablet ? 30 : 19, + fontWeight: FontWeight.bold, + color: MyColors.white.withOpacity(0.83), + height: 32 / 22, + ), + ), + ), + isTablet ? 10.height : 3.height, + CountdownTimerForMainScreen( + timeToMarathon: DateUtil.convertStringToDateMarathon(dashboardProvider.eventActivity!.startOn!).millisecondsSinceEpoch, + provider: context.read(), + ), + ], + ).paddingOnly( + left: AppState().isArabic(context) ? 12 : 3, + right: AppState().isArabic(context) ? 3 : 12, + ) + ], + ), + ), + ), + ], + ), + ), + // AppState().isArabic(context) + // ? Align( + // alignment: Alignment.topRight, + // child: SizedBox( + // height: isTablet ? 30 : 20, + // width: isTablet ? 45 : 35, + // child: Transform.rotate( + // angle: math.pi / 4.5, + // child: Text( + // LocaleKeys.brainMarathon.tr(), + // textAlign: TextAlign.center, + // maxLines: 2, + // style: TextStyle( + // color: MyColors.white, + // fontWeight: FontWeight.bold, + // fontSize: isTablet ? 8 : 6, + // height: 1.2, + // ), + // ), + // ), + // ), + // ).paddingOnly(top: 5) + // : Align( + // alignment: Alignment.topLeft, + // child: SizedBox( + // height: isTablet ? 30 : 20, + // width: isTablet ? 45 : 35, + // child: Transform.rotate( + // angle: -math.pi / 4.5, + // child: Text( + // LocaleKeys.brainMarathon.tr(), + // textAlign: TextAlign.center, + // maxLines: 2, + // style: TextStyle( + // color: MyColors.kWhiteColor, + // fontWeight: FontWeight.bold, + // fontSize: isTablet ? 8 : 6, + // height: 1.2, + // ), + // ), + // ), + // ), + // ).paddingOnly(top: 5), + !AppState().isArabic(context) + ? Positioned( + right: 0, + bottom: 0, + child: RotatedBox( + quarterTurns: 4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.whiteColor), + ).paddingAll(isTablet ? 20 : 15), + ) + : Positioned( + bottom: 0, + left: 0, + child: RotatedBox( + quarterTurns: 2, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.whiteColor), + ).paddingAll(isTablet ? 20 : 15), + ), + ], + ).onPress(() async { + // int remainingTimeInMinutes = DateTime.parse(dashboardProvider.eventActivity!.startOn!).difference(DateTime.now()).inMinutes; + // if (remainingTimeInMinutes > 5 && dashboardProvider.eventActivity.sponsors != null && provider.marathonDetailModel.sponsors!.isNotEmpty) { + // Utils.showLoading(context); + // try { + // await provider.initializeVideoPlayer().then((_) { + // Utils.hideLoading(context); + // provider.startTimerForSponsorVideo(); + // Navigator.pushNamed(context, AppRoutes.marathonSponsorVideoScreen); + // }); + // } catch (e) { + // if (kDebugMode) { + // log("Error in VideoPlayer: ${e.toString()}"); + // } + // Utils.hideLoading(context); + // Navigator.pushNamed(context, AppRoutes.marathonIntroScreen); + // } + // } else { + // Navigator.pushNamed(context, AppRoutes.marathonIntroScreen); + // } + // provider.updateLanguageAsPerMarathon(context, provider.isUpComingMarathon ? provider.marathonDetailModel : provider.demoMarathonDetailModel); + })), + ), + ); + } +} diff --git a/lib/widgets/glowy_borders/glowy_borders.dart b/lib/widgets/glowy_borders/glowy_borders.dart new file mode 100644 index 0000000..ffdc31b --- /dev/null +++ b/lib/widgets/glowy_borders/glowy_borders.dart @@ -0,0 +1,150 @@ +library glowy_borderspertino.dart; + +import 'dart:math' as math; + +import 'package:flutter/cupertino.dart'; +import 'package:mohem_flutter_app/classes/colors.dart'; + +class AnimatedGradientBorder extends StatefulWidget { + const AnimatedGradientBorder( + {Key? key, + required this.child, + required this.gradientColors, + required this.borderRadius, + this.animationTime, + this.borderSize, + this.animationProgress, + this.stretchAlongAxis = false, + this.stretchAxis = Axis.horizontal}); + + final Widget child; + final double? borderSize; + final List gradientColors; + final BorderRadiusGeometry borderRadius; + final int? animationTime; + final double? animationProgress; + final bool stretchAlongAxis; + final Axis stretchAxis; + + @override + State createState() => AnimatedGradientState(); +} + +class AnimatedGradientState extends State with SingleTickerProviderStateMixin { + late AnimationController _controller; + late Animation _angleAnimation; + + @override + void initState() { + super.initState(); + _controller = AnimationController(vsync: this, duration: Duration(seconds: widget.animationTime ?? 2)); + _controller.addListener(() => setState(() {})); + _angleAnimation = Tween(begin: 0.1, end: 2 * math.pi).animate(_controller); + if (widget.animationProgress != null) { + _controller.forward(); + } else { + _controller.repeat(); + } + } + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } + + @override + void didUpdateWidget(covariant AnimatedGradientBorder oldWidget) { + super.didUpdateWidget(oldWidget); + double? animateTo = widget.animationProgress; + if (animateTo != null) { + _controller.animateTo(animateTo); + } else { + _controller.repeat(); + } + } + + @override + Widget build(BuildContext context) { + double? negativeMargin = -1.0 * (widget.borderSize ?? 0); + return Container( + padding: EdgeInsets.all(widget.borderSize ?? 0), + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: MyColors.kWhiteColor, + borderRadius: BorderRadius.circular(10), + boxShadow: [ + BoxShadow( + color: const Color(0xff000000).withOpacity(.05), + blurRadius: 26, + offset: const Offset(0, -3), + ), + ], + ), + child: Stack(alignment: Alignment.center, clipBehavior: Clip.none, children: [ + Positioned( + top: negativeMargin, + left: negativeMargin, + right: negativeMargin, + bottom: negativeMargin, + child: AnimatedGradientContainer( + gradientColors: widget.gradientColors, + borderRadius: widget.borderRadius, + gradientAngle: _angleAnimation.value, + )), + widget.child, + // BackdropFilter( + // filter: ImageFilter.blur(sigmaX: widget.glowSize ?? 0, sigmaY: widget.glowSize ?? 0), + // child: Stack( + // alignment: Alignment.center, + // clipBehavior: Clip.none, + // children: [ + // Positioned( + // top: negativeMargin, + // right: negativeMargin, + // left: negativeMargin, + // bottom: negativeMargin, + // child: AnimatedGradientContainer( + // gradientColors: widget.gradientColors, + // borderRadius: widget.borderRadius, + // gradientAngle: _angleAnimation.value, + // )), + // if (widget.stretchAlongAxis) + // SizedBox( + // width: widget.stretchAxis == Axis.horizontal ? double.infinity : null, + // height: widget.stretchAxis == Axis.vertical ? double.infinity : null, + // child: widget.child, + // ) + // else + // widget.child, + // ], + // ), + // ), + ]), + ); + } +} + +class AnimatedGradientContainer extends StatelessWidget { + const AnimatedGradientContainer({Key? key, required this.gradientColors, required this.gradientAngle, required this.borderRadius}); + + final List gradientColors; + final double gradientAngle; + final BorderRadiusGeometry borderRadius; + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + borderRadius: borderRadius, + gradient: SweepGradient( + colors: [...gradientColors, ...gradientColors.reversed], stops: _generateColorStops([...gradientColors, ...gradientColors.reversed]), transform: GradientRotation(gradientAngle)))); + } + + List _generateColorStops(List colors) { + return colors.asMap().entries.map((entry) { + double percentageStop = entry.key / colors.length; + return percentageStop; + }).toList(); + } +} From 75ba1283d3066aa14b1ae28d333021e8f13e4089 Mon Sep 17 00:00:00 2001 From: sultan khan Date: Wed, 5 Feb 2025 10:39:03 +0300 Subject: [PATCH 05/10] event activity page added. --- assets/langs/ar-SA.json | 4 +- assets/langs/en-US.json | 4 +- lib/config/routes.dart | 4 + lib/generated/codegen_loader.g.dart | 8 +- lib/generated/locale_keys.g.dart | 3 +- lib/models/dashboard/event_activity.dart | 11 +- lib/ui/landing/dashboard_screen.dart | 6 +- lib/ui/landing/event_activity_banner.dart | 340 ++++-------------- .../widgets/countdown_timer_main_screen.dart | 18 +- .../event_activity/activity_event_card.dart | 112 ++++++ .../event_activity/activity_footer.dart | 39 ++ .../event_activity/event_activity.dart | 49 +++ 12 files changed, 303 insertions(+), 295 deletions(-) create mode 100644 lib/ui/screens/event_activity/activity_event_card.dart create mode 100644 lib/ui/screens/event_activity/activity_footer.dart create mode 100644 lib/ui/screens/event_activity/event_activity.dart diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 1eb7dde..c4c5f20 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -613,5 +613,7 @@ "manageGroup": "إدارة المجموعة", "members": "الأعضاء", "searchByUserName": "البحث بواسطة اسم المستخدم", - "shareScreen": "مشاركة الشاشة" + "shareScreen": "مشاركة الشاشة", + "start":"يبدأ", + "about":"عن" } \ No newline at end of file diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index 03ae4d6..559b9c9 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -611,5 +611,7 @@ "qtyOrdered": "Qty. Ordered", "qtyReceived": "Qty. Received", "bonusQty": "Bonus Qty.", - "balQty": "Bal. Qty." + "balQty": "Bal. Qty.", + "start":"Start", + "about":"About" } \ No newline at end of file diff --git a/lib/config/routes.dart b/lib/config/routes.dart index 6afc095..4653880 100644 --- a/lib/config/routes.dart +++ b/lib/config/routes.dart @@ -56,6 +56,7 @@ import 'package:mohem_flutter_app/ui/screens/announcements/announcements.dart'; import 'package:mohem_flutter_app/ui/screens/child_education/child_education_assistance.dart'; // import 'package:mohem_flutter_app/ui/my_attendance/work_from_home_screen.dart'; import 'package:mohem_flutter_app/ui/screens/eit/add_eit.dart'; +import 'package:mohem_flutter_app/ui/screens/event_activity/event_activity.dart'; import 'package:mohem_flutter_app/ui/screens/items_for_sale/add_new_item_for_sale.dart'; import 'package:mohem_flutter_app/ui/screens/items_for_sale/item_for_sale_detail.dart'; import 'package:mohem_flutter_app/ui/screens/items_for_sale/items_for_sale_home.dart'; @@ -208,6 +209,8 @@ class AppRoutes { static const String appUpdateScreen = "/appUpdateScreen"; static const String childEducation = "/childEducation"; + static const String activityScreen = "/activityScreen"; + static final Map routes = { login: (BuildContext context) => LoginScreen(), verifyLogin: (BuildContext context) => VerifyLoginScreen(), @@ -325,5 +328,6 @@ class AppRoutes { unsafeDeviceScreen: (BuildContext context) => const UnsafeDeviceScreen(), appUpdateScreen: (BuildContext context) => const AppUpdateScreen(), childEducation: (BuildContext context) => ChildEducationAssistance(), + activityScreen:(BuildContext context) => const EventActivityScreen() }; } diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart index 36d809d..0e2cfbf 100644 --- a/lib/generated/codegen_loader.g.dart +++ b/lib/generated/codegen_loader.g.dart @@ -626,7 +626,9 @@ class CodegenLoader extends AssetLoader{ "manageGroup": "إدارة المجموعة", "members": "الأعضاء", "searchByUserName": "البحث بواسطة اسم المستخدم", - "shareScreen": "مشاركة الشاشة" + "shareScreen": "مشاركة الشاشة", + "start":"يبدأ", + "about":"عن" }; static const Map en_US = { "mohemm": "Mohemm", @@ -1240,7 +1242,9 @@ static const Map en_US = { "qtyOrdered": "Qty. Ordered", "qtyReceived": "Qty. Received", "bonusQty": "Bonus Qty.", - "balQty": "Bal. Qty." + "balQty": "Bal. Qty.", + "start":"Start", + "about":"About" }; static const Map> mapLocales = {"ar_SA": ar_SA, "en_US": en_US}; } diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 851a5cd..f8bc858 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -597,5 +597,6 @@ abstract class LocaleKeys { static const members = 'members'; static const searchByUserName = 'searchByUserName'; static const shareScreen = 'shareScreen'; - + static const start = 'start'; + static const about ='about'; } diff --git a/lib/models/dashboard/event_activity.dart b/lib/models/dashboard/event_activity.dart index e7e821c..4b523d7 100644 --- a/lib/models/dashboard/event_activity.dart +++ b/lib/models/dashboard/event_activity.dart @@ -1,4 +1,4 @@ -class EventActivityList { + class EventActivityList { EventActivityList({ required this.id, required this.titleEn, @@ -16,6 +16,8 @@ class EventActivityList { required this.createdOn, required this.modifiedBy, required this.modifiedOn, + required this.shortImageURL, + required this.detailImageURL }); final int? id; @@ -34,7 +36,8 @@ class EventActivityList { final String? createdOn; final String? modifiedBy; final String? modifiedOn; - + final String? shortImageURL; + final String? detailImageURL; factory EventActivityList.fromJson(Map json) { return EventActivityList( id: json["ID"], @@ -53,6 +56,8 @@ class EventActivityList { createdOn: json["CreatedOn"], modifiedBy: json["ModifiedBy"], modifiedOn: json["ModifiedOn"], + shortImageURL: json["ShortImageURL"], + detailImageURL: json["DetailImageURL"] ); } @@ -73,5 +78,7 @@ class EventActivityList { "CreatedOn": createdOn, "ModifiedBy": modifiedBy, "ModifiedOn": modifiedOn, + "DetailImageURL": detailImageURL, + "ShortImageURL" : shortImageURL }; } diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index 67e748c..4640c25 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -712,9 +712,9 @@ class _DashboardScreenState extends State with WidgetsBindingOb Widget eventActivityWidget(BuildContext context) { return (context.watch().isEventLoadingLoading) ? const MarathonBannerShimmer().paddingOnly(left: 21, right: 21, bottom: 21, top: 0) - : context.watch().eventActivity == null - ? const SizedBox() - : const EventActivityBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 0); + : (context.watch().eventActivity != null && context.watch().eventActivity!.isActive ==true) + ? const EventActivityBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 0) + : const SizedBox(); } void navigateToDetails(OffersListModel offersListModelObj) { diff --git a/lib/ui/landing/event_activity_banner.dart b/lib/ui/landing/event_activity_banner.dart index 83c58dd..47c8158 100644 --- a/lib/ui/landing/event_activity_banner.dart +++ b/lib/ui/landing/event_activity_banner.dart @@ -19,170 +19,11 @@ import 'package:mohem_flutter_app/ui/marathon/widgets/countdown_timer_main_scree import 'package:mohem_flutter_app/widgets/glowy_borders/glowy_borders.dart'; import 'package:provider/provider.dart'; -// It is used to pass a dummy time to test Marathon int dummyTime = DateTime.now().millisecondsSinceEpoch + 8690; class EventActivityBanner extends StatelessWidget { const EventActivityBanner({Key? key}) : super(key: key); - // Widget getUnPrivilegedMarathon(BuildContext context) { - // return Container( - // decoration: MyDecorations.shadowDecoration, - // height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11, - // clipBehavior: Clip.antiAlias, - // child: Stack( - // children: [ - // Transform( - // alignment: Alignment.center, - // transform: Matrix4.rotationY( - // AppState().isArabic(context) ? math.pi : 0, - // ), - // child: SvgPicture.asset( - // "assets/images/marathon_banner_bg.svg", - // fit: BoxFit.fill, - // width: double.infinity, - // ), - // ), - // AppState().isArabic(context) - // ? Positioned( - // right: -15, - // top: -10, - // child: Transform.rotate( - // angle: 10, - // child: Container( - // width: isTablet ? 70 : 65, - // height: isTablet ? 40 : 32, - // color: MyColors.darkDigitColor, - // ), - // ), - // ) - // : Positioned( - // left: -20, - // top: -10, - // child: Transform.rotate( - // angle: 15, - // child: Container( - // width: isTablet ? 70 : 65, - // height: isTablet ? 40 : 32, - // color: MyColors.darkDigitColor, - // ), - // ), - // ), - // SizedBox( - // width: double.infinity, - // height: double.infinity, - // child: Row( - // children: [ - // const Expanded( - // flex: 3, - // child: SizedBox( - // width: double.infinity, - // height: double.infinity, - // ), - // ), - // Expanded( - // flex: AppState().isArabic(context) ? 4 : 5, - // child: SizedBox( - // width: double.infinity, - // height: double.infinity, - // child: Row( - // mainAxisAlignment: MainAxisAlignment.start, - // children: [ - // Column( - // mainAxisAlignment: MainAxisAlignment.center, - // crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisSize: MainAxisSize.min, - // children: [ - // AppState().isArabic(context) ? 0.height : 5.height, - // Text( - // LocaleKeys.getReadyForContest.tr(), - // style: TextStyle( - // fontSize: isTablet ? 20 : 11, - // fontStyle: FontStyle.italic, - // fontWeight: FontWeight.w600, - // color: MyColors.white.withOpacity(0.83), - // letterSpacing: -0.4, - // ), - // ), - // Text( - // LocaleKeys.brainMarathon.tr(), - // style: TextStyle( - // fontStyle: FontStyle.italic, - // fontSize: isTablet ? 30 : 19, - // fontWeight: FontWeight.bold, - // color: MyColors.white.withOpacity(0.83), - // height: 32 / 22, - // ), - // ), - // ], - // ).paddingOnly( - // left: AppState().isArabic(context) ? 12 : 3, - // right: AppState().isArabic(context) ? 3 : 12, - // ) - // ], - // ), - // ), - // ), - // ], - // ), - // ), - // AppState().isArabic(context) - // ? Align( - // alignment: Alignment.topRight, - // child: SizedBox( - // height: isTablet ? 30 : 20, - // width: isTablet ? 45 : 35, - // child: Transform.rotate( - // angle: math.pi / 4.5, - // child: Text( - // LocaleKeys.brainMarathon.tr(), - // textAlign: TextAlign.center, - // maxLines: 2, - // style: TextStyle( - // color: MyColors.white, - // fontWeight: FontWeight.bold, - // fontSize: isTablet ? 8 : 6, - // height: 1.2, - // ), - // ), - // ), - // ), - // ).paddingOnly(top: 5) - // : Align( - // alignment: Alignment.topLeft, - // child: SizedBox( - // height: isTablet ? 30 : 20, - // width: isTablet ? 45 : 35, - // child: Transform.rotate( - // angle: -math.pi / 4.5, - // child: Text( - // LocaleKeys.brainMarathon.tr(), - // textAlign: TextAlign.center, - // maxLines: 2, - // style: TextStyle( - // color: MyColors.kWhiteColor, - // fontWeight: FontWeight.bold, - // fontSize: isTablet ? 8 : 6, - // height: 1.2, - // ), - // ), - // ), - // ), - // ).paddingOnly(top: 5), - // Container( - // height: double.infinity, - // width: double.infinity, - // color: Colors.black.withOpacity(0.6), - // child: const Icon( - // Icons.lock_rounded, - // color: MyColors.lightGreyIconColor, - // ), - // ), - // ], - // ), - // ); - // } - Widget getNoUpcomingMarathonWidget(BuildContext context) { return Container( decoration: MyDecorations.shadowDecoration, @@ -348,7 +189,7 @@ class EventActivityBanner extends StatelessWidget { Widget build(BuildContext context) { DashboardProviderModel dashboardProvider = context.read(); - return Container( + return SizedBox( // decoration: BoxDecoration( // color: MyColors.kWhiteColor, // borderRadius: BorderRadius.circular(8), @@ -384,52 +225,46 @@ class EventActivityBanner extends StatelessWidget { children: [ // Transform( // alignment: Alignment.center, - // transform: Matrix4.rotationY( - // AppState().isArabic(context) ? math.pi : 0, - // ), - // child: SvgPicture.asset( - // "assets/images/marathon_banner_bg.svg", - // fit: BoxFit.fill, - // width: double.infinity, - // ), - // ), - // AppState().isArabic(context) - // ? Positioned( - // right: -15, - // top: -10, - // child: Transform.rotate( - // angle: 10, - // child: Container( - // width: isTablet ? 70 : 65, - // height: isTablet ? 40 : 32, - // color: MyColors.darkDigitColor, - // ), - // ), - // ) - // : Positioned( - // left: -20, - // top: -10, - // child: Transform.rotate( - // angle: 15, - // child: Container( - // width: isTablet ? 70 : 65, - // height: isTablet ? 40 : 32, - // color: MyColors.darkDigitColor, - // ), - // ), - // ), + // // transform: Matrix4.rotationY( + // // AppState().isArabic(context) ? math.pi : 0, + // // ), + // child: + // + + AppState().isArabic(context) + ? Positioned( + left: -15, + top: -10, + child: Transform.rotate( + angle: 10, + child: SizedBox( + child: SvgPicture.asset( + "assets/images/light_bulb.svg"), + ), + ), + ) + : Positioned( + right: 0, + top: 10, + child: Opacity( + opacity: .5, + child: SvgPicture.asset( + "assets/images/light_bulb.svg", + ), + )), + SizedBox( width: double.infinity, height: double.infinity, child: Row( children: [ - const Expanded( - flex: 3, - child: SizedBox( - width: double.infinity, - height: double.infinity, - ), - ), + Expanded( + flex: 3, + child: Image.network( + dashboardProvider.eventActivity?.shortImageURL ?? + "", + fit: BoxFit.cover, + )), Expanded( flex: AppState().isArabic(context) ? 4 : 5, child: SizedBox( @@ -444,16 +279,7 @@ class EventActivityBanner extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ AppState().isArabic(context) ? 0.height : 5.height, - Text( - LocaleKeys.getReadyForContest.tr(), - style: TextStyle( - fontSize: isTablet ? 20 : 11, - fontStyle: FontStyle.italic, - fontWeight: FontWeight.w600, - color: MyColors.white.withOpacity(0.83), - letterSpacing: -0.4, - ), - ), + Flexible( child: Text( displayLocalizedContent( @@ -465,17 +291,33 @@ class EventActivityBanner extends StatelessWidget { overflow: TextOverflow.ellipsis, style: TextStyle( fontStyle: FontStyle.italic, - fontSize: isTablet ? 30 : 19, + fontSize: isTablet ? 25 : 16, fontWeight: FontWeight.bold, - color: MyColors.white.withOpacity(0.83), - height: 32 / 22, + color: MyColors.white, + height: 32 / 24, ), ), + ), Text( + displayLocalizedContent( + isPhoneLangArabic: AppState().isArabic(context), + selectedLanguage: 3, + englishContent: dashboardProvider.eventActivity?.shortDescEn ?? "", + arabicContent: dashboardProvider.eventActivity?.shortDescAr ?? "", + ), + style: TextStyle( + fontSize: isTablet ? 20 : 11, + fontStyle: FontStyle.italic, + fontWeight: FontWeight.w600, + color: MyColors.white, + letterSpacing: -0.5, + ), ), - isTablet ? 10.height : 3.height, + + isTablet ? 15.height : 10.height, CountdownTimerForMainScreen( timeToMarathon: DateUtil.convertStringToDateMarathon(dashboardProvider.eventActivity!.startOn!).millisecondsSinceEpoch, provider: context.read(), + isEvent: true, ), ], ).paddingOnly( @@ -489,49 +331,7 @@ class EventActivityBanner extends StatelessWidget { ], ), ), - // AppState().isArabic(context) - // ? Align( - // alignment: Alignment.topRight, - // child: SizedBox( - // height: isTablet ? 30 : 20, - // width: isTablet ? 45 : 35, - // child: Transform.rotate( - // angle: math.pi / 4.5, - // child: Text( - // LocaleKeys.brainMarathon.tr(), - // textAlign: TextAlign.center, - // maxLines: 2, - // style: TextStyle( - // color: MyColors.white, - // fontWeight: FontWeight.bold, - // fontSize: isTablet ? 8 : 6, - // height: 1.2, - // ), - // ), - // ), - // ), - // ).paddingOnly(top: 5) - // : Align( - // alignment: Alignment.topLeft, - // child: SizedBox( - // height: isTablet ? 30 : 20, - // width: isTablet ? 45 : 35, - // child: Transform.rotate( - // angle: -math.pi / 4.5, - // child: Text( - // LocaleKeys.brainMarathon.tr(), - // textAlign: TextAlign.center, - // maxLines: 2, - // style: TextStyle( - // color: MyColors.kWhiteColor, - // fontWeight: FontWeight.bold, - // fontSize: isTablet ? 8 : 6, - // height: 1.2, - // ), - // ), - // ), - // ), - // ).paddingOnly(top: 5), + !AppState().isArabic(context) ? Positioned( right: 0, @@ -551,25 +351,11 @@ class EventActivityBanner extends StatelessWidget { ), ], ).onPress(() async { - // int remainingTimeInMinutes = DateTime.parse(dashboardProvider.eventActivity!.startOn!).difference(DateTime.now()).inMinutes; - // if (remainingTimeInMinutes > 5 && dashboardProvider.eventActivity.sponsors != null && provider.marathonDetailModel.sponsors!.isNotEmpty) { - // Utils.showLoading(context); - // try { - // await provider.initializeVideoPlayer().then((_) { - // Utils.hideLoading(context); - // provider.startTimerForSponsorVideo(); - // Navigator.pushNamed(context, AppRoutes.marathonSponsorVideoScreen); - // }); - // } catch (e) { - // if (kDebugMode) { - // log("Error in VideoPlayer: ${e.toString()}"); - // } - // Utils.hideLoading(context); - // Navigator.pushNamed(context, AppRoutes.marathonIntroScreen); - // } - // } else { - // Navigator.pushNamed(context, AppRoutes.marathonIntroScreen); - // } + int remainingTimeInMinutes = DateUtil.convertStringToDateMarathon(dashboardProvider.eventActivity!.startOn!).difference(DateTime.now()).inMinutes; + if (remainingTimeInMinutes < 0) { + Navigator.pushNamed(context, AppRoutes.activityScreen); + + } // provider.updateLanguageAsPerMarathon(context, provider.isUpComingMarathon ? provider.marathonDetailModel : provider.demoMarathonDetailModel); })), ), diff --git a/lib/ui/marathon/widgets/countdown_timer_main_screen.dart b/lib/ui/marathon/widgets/countdown_timer_main_screen.dart index ef828da..e9818c2 100644 --- a/lib/ui/marathon/widgets/countdown_timer_main_screen.dart +++ b/lib/ui/marathon/widgets/countdown_timer_main_screen.dart @@ -13,19 +13,15 @@ import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart'; class CountdownTimerForMainScreen extends StatelessWidget { final int timeToMarathon; final MarathonProvider provider; - + final bool isEvent; CountdownTimerForMainScreen({ Key? key, required this.provider, required this.timeToMarathon, + this.isEvent =false, }) : super(key: key); - final TextStyle styleTextHome = TextStyle( - color: MyColors.white.withOpacity(0.45), - fontStyle: FontStyle.italic, - fontWeight: FontWeight.w800, - letterSpacing: -0.4, - ); + final TextStyle styleDigitHome = TextStyle( height: 22 / 27, @@ -75,7 +71,13 @@ class CountdownTimerForMainScreen extends StatelessWidget { text, minFontSize: 7, maxFontSize: 8, - style: styleTextHome, + style: TextStyle( + color: isEvent ? MyColors.white : MyColors.white.withOpacity(0.45), + fontStyle: FontStyle.italic, + fontWeight: FontWeight.w800, + letterSpacing: -0.4, + ), + ); } diff --git a/lib/ui/screens/event_activity/activity_event_card.dart b/lib/ui/screens/event_activity/activity_event_card.dart new file mode 100644 index 0000000..5c02971 --- /dev/null +++ b/lib/ui/screens/event_activity/activity_event_card.dart @@ -0,0 +1,112 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:mohem_flutter_app/app_state/app_state.dart'; +import 'package:mohem_flutter_app/classes/colors.dart'; +import 'package:mohem_flutter_app/classes/consts.dart'; +import 'package:mohem_flutter_app/classes/decorations_helper.dart'; +import 'package:mohem_flutter_app/extensions/int_extensions.dart'; +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/main.dart'; +import 'package:mohem_flutter_app/models/marathon/marathon_model.dart'; +import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; +import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart'; +import 'package:provider/provider.dart'; +import 'package:shimmer/shimmer.dart'; + +class ActivityEventDetailsCard extends StatelessWidget { + final DashboardProviderModel model; + + const ActivityEventDetailsCard({Key? key, required this.model}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + decoration: MyDecorations.shadowDecoration, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CachedNetworkImage( + imageUrl: model.eventActivity!.detailImageURL!, + placeholder: (BuildContext context, String url) => const LinearProgressIndicator( + value: 0.7, + minHeight: 200, + valueColor: AlwaysStoppedAnimation(Colors.white), + backgroundColor: Color(0xff196D73), + ).toShimmer(), + fit: BoxFit.cover,width: double.infinity , + ), + + ], + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(height: 20,), + Text( + displayLocalizedContent( + isPhoneLangArabic: AppState().isArabic(context), + selectedLanguage: 3, + englishContent: model.eventActivity?.titleEn ?? "", + arabicContent: model.eventActivity?.titleAr ?? "", + ), + style: TextStyle( + fontStyle: FontStyle.italic, + fontSize: isTablet ? 30 : 20, + fontWeight: FontWeight.bold, + color:const Color(0xff3C3838), + // height: 42 / 30, + ), + + ).paddingOnly(left: 10, right: 10, bottom: 2), + + Row(children:[ + SvgPicture.asset("assets/images/highlight.svg"), + Text( + displayLocalizedContent( + isPhoneLangArabic: AppState().isArabic(context), + selectedLanguage: 3, + englishContent: model.eventActivity?.shortDescEn ?? "", + arabicContent: model.eventActivity?.shortDescAr ?? "", + ), + style: TextStyle( + fontStyle: FontStyle.italic, + fontSize: isTablet ? 20 : 14, + fontWeight: FontWeight.bold, + color:const Color(0xff2BB8A8), + // height: 32 / 24, + ), + + ).paddingOnly(left: 10, right: 10) + ]).paddingOnly(bottom: 25), + + LocaleKeys.about.tr().toText16(color: const Color(0xff3C3838)).paddingOnly(bottom: 5), + Text( + displayLocalizedContent( + isPhoneLangArabic: AppState().isArabic(context), + selectedLanguage: 3, + englishContent: model.eventActivity?.longDescEn ?? "", + arabicContent: model.eventActivity?.longDescAr ?? "", + ), + style: TextStyle( + fontStyle: FontStyle.italic, + fontSize: isTablet ? 18 : 12, + fontWeight: FontWeight.bold, + color:const Color(0xff3C3838), + // height: 32 / 24, + ), + + ).paddingOnly(bottom: 10) + ], + ) + ]); + } +} diff --git a/lib/ui/screens/event_activity/activity_footer.dart b/lib/ui/screens/event_activity/activity_footer.dart new file mode 100644 index 0000000..a5fcd81 --- /dev/null +++ b/lib/ui/screens/event_activity/activity_footer.dart @@ -0,0 +1,39 @@ +// ignore_for_file: always_specify_types + +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:mohem_flutter_app/app_state/app_state.dart'; +import 'package:mohem_flutter_app/classes/colors.dart'; +import 'package:mohem_flutter_app/extensions/int_extensions.dart'; +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/main.dart'; +import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; +import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart'; +import 'package:mohem_flutter_app/widgets/button/default_button.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class ActivityEventFooter extends StatelessWidget { + final DashboardProviderModel provider; + + const ActivityEventFooter({ + Key? key, + required this.provider, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Column(children: [ + DefaultButton( + LocaleKeys.start.tr(), + () => launchUrl(Uri.parse(provider.eventActivity!.url!)), + color: MyColors.greenColor, + ).insideContainer, + + ]); + + } + + +} diff --git a/lib/ui/screens/event_activity/event_activity.dart b/lib/ui/screens/event_activity/event_activity.dart new file mode 100644 index 0000000..f523eb6 --- /dev/null +++ b/lib/ui/screens/event_activity/event_activity.dart @@ -0,0 +1,49 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:mohem_flutter_app/extensions/int_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/marathon/marathon_provider.dart'; +import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_details_card.dart'; +import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_footer.dart'; +import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_timer_card.dart'; +import 'package:mohem_flutter_app/ui/screens/event_activity/activity_event_card.dart'; +import 'package:mohem_flutter_app/ui/screens/event_activity/activity_footer.dart'; +import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; +import 'package:provider/provider.dart'; + +class EventActivityScreen extends StatelessWidget { + const EventActivityScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + DashboardProviderModel provider = context.read(); + return Scaffold( + appBar: AppBarWidget( + context, + title: LocaleKeys.details.tr(), + onHomeTapped: () { + Navigator.pop(context); + + }, + onBackTapped: () { + Navigator.pop(context); + }, + ), + body: Column( + children: [ + ListView( + padding: const EdgeInsets.all(21), + children: [ + ActivityEventDetailsCard(model: provider), + 20.height, + ], + ).expanded, + 1.divider, + ActivityEventFooter(provider: provider), + ], + ), + ); + } +} From 822a99a2918ae5b573080f305272c04843023bc7 Mon Sep 17 00:00:00 2001 From: sultan khan Date: Wed, 5 Feb 2025 17:38:14 +0300 Subject: [PATCH 06/10] countdown updated. --- lib/ui/landing/event_activity_banner.dart | 6 +- .../event_activity/activity_footer.dart | 63 +++++++++++++++++-- 2 files changed, 62 insertions(+), 7 deletions(-) diff --git a/lib/ui/landing/event_activity_banner.dart b/lib/ui/landing/event_activity_banner.dart index 47c8158..2e9315f 100644 --- a/lib/ui/landing/event_activity_banner.dart +++ b/lib/ui/landing/event_activity_banner.dart @@ -351,11 +351,11 @@ class EventActivityBanner extends StatelessWidget { ), ], ).onPress(() async { - int remainingTimeInMinutes = DateUtil.convertStringToDateMarathon(dashboardProvider.eventActivity!.startOn!).difference(DateTime.now()).inMinutes; - if (remainingTimeInMinutes < 0) { + // int remainingTimeInMinutes = DateUtil.convertStringToDateMarathon(dashboardProvider.eventActivity!.startOn!).difference(DateTime.now()).inMinutes; + // if (remainingTimeInMinutes < 0) { Navigator.pushNamed(context, AppRoutes.activityScreen); - } + //} // provider.updateLanguageAsPerMarathon(context, provider.isUpComingMarathon ? provider.marathonDetailModel : provider.demoMarathonDetailModel); })), ), diff --git a/lib/ui/screens/event_activity/activity_footer.dart b/lib/ui/screens/event_activity/activity_footer.dart index a5fcd81..8db2175 100644 --- a/lib/ui/screens/event_activity/activity_footer.dart +++ b/lib/ui/screens/event_activity/activity_footer.dart @@ -2,8 +2,10 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/classes/colors.dart'; +import 'package:mohem_flutter_app/classes/date_uitl.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; @@ -11,7 +13,9 @@ import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/main.dart'; import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart'; +import 'package:mohem_flutter_app/ui/marathon/widgets/countdown_timer_main_screen.dart'; import 'package:mohem_flutter_app/widgets/button/default_button.dart'; +import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; class ActivityEventFooter extends StatelessWidget { @@ -24,12 +28,63 @@ class ActivityEventFooter extends StatelessWidget { @override Widget build(BuildContext context) { + + int remainingTime = DateTime.now().millisecondsSinceEpoch + DateUtil.convertStringToDateMarathon(provider.eventActivity!.startOn!).difference(DateTime.now()).inMilliseconds; + return Column(children: [ - DefaultButton( + CountdownTimer( + endTime: remainingTime, + widgetBuilder: (context, time) { + if (time == null) { + return DefaultButton( + LocaleKeys.start.tr(), + () => launchUrl(Uri.parse(provider.eventActivity!.url!)), + color: MyColors.greenColor, + ).insideContainer; + } + return Container( + height: 58, + padding: const EdgeInsets.only( + top: 15, bottom: 15, right: 30, left: 30), + margin: const EdgeInsets.only(top: 5, bottom: 5), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.0), + gradient: + const LinearGradient( + transform: GradientRotation(.83), + begin: Alignment.topRight, + end: Alignment.bottomLeft, + colors: [ + MyColors.gradiantEndColor, + MyColors.gradiantStartColor + ], + ), + ), + child: CountdownTimerForMainScreen( + timeToMarathon: DateUtil + .convertStringToDateMarathon(provider.eventActivity!.startOn!) + .millisecondsSinceEpoch, + provider: context.read(), + isEvent: true, + )); + + }, + onEnd: (){ + + }, + endWidget: DefaultButton( LocaleKeys.start.tr(), - () => launchUrl(Uri.parse(provider.eventActivity!.url!)), - color: MyColors.greenColor, - ).insideContainer, + () => launchUrl(Uri.parse(provider.eventActivity!.url!)), + color: MyColors.greenColor, + ).insideContainer, + + ) + // if (remainingTimeInMinutes < 0) + // + // else + // + // + // , ]); From 29334a9ef01dbde505ca7f04b3e4cd0f8969acff Mon Sep 17 00:00:00 2001 From: sultan khan Date: Thu, 6 Feb 2025 10:38:15 +0300 Subject: [PATCH 07/10] leave balance page fix. --- lib/ui/leave_balance/leave_balance_screen.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/ui/leave_balance/leave_balance_screen.dart b/lib/ui/leave_balance/leave_balance_screen.dart index 447767f..85354f9 100644 --- a/lib/ui/leave_balance/leave_balance_screen.dart +++ b/lib/ui/leave_balance/leave_balance_screen.dart @@ -64,7 +64,7 @@ class _LeaveBalanceState extends State { context, title: LocaleKeys.leaveBalance.tr(), ), - body: Column( + body:SingleChildScrollView(child:Column( children: [ Padding( padding: const EdgeInsets.all(21.0), @@ -76,8 +76,10 @@ class _LeaveBalanceState extends State { : (absenceTransList!.isEmpty ? Utils.getNoDataWidget(context).paddingOnly(top: 50) : ListView( - physics: const BouncingScrollPhysics(), + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), padding: const EdgeInsets.all(21), + children: [ // BalancesDashboardWidget(LocaleKeys.currentLeaveBalance.tr(), true, selectedEmp: employeeId, showLoading: false), // 12.height, @@ -113,7 +115,7 @@ class _LeaveBalanceState extends State { ], )), ], - ), + )), floatingActionButton: Container( height: 54, width: 54, From 6e15336cc48b8f0fcc3c391e8b51afb322ad6cc4 Mon Sep 17 00:00:00 2001 From: sultan khan Date: Thu, 6 Feb 2025 11:22:30 +0300 Subject: [PATCH 08/10] image changes. --- lib/ui/landing/event_activity_banner.dart | 5 ++++- lib/ui/screens/event_activity/activity_event_card.dart | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/ui/landing/event_activity_banner.dart b/lib/ui/landing/event_activity_banner.dart index 2e9315f..511b0fe 100644 --- a/lib/ui/landing/event_activity_banner.dart +++ b/lib/ui/landing/event_activity_banner.dart @@ -25,6 +25,7 @@ class EventActivityBanner extends StatelessWidget { const EventActivityBanner({Key? key}) : super(key: key); Widget getNoUpcomingMarathonWidget(BuildContext context) { + ; return Container( decoration: MyDecorations.shadowDecoration, height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11, @@ -258,13 +259,15 @@ class EventActivityBanner extends StatelessWidget { height: double.infinity, child: Row( children: [ + Expanded( flex: 3, child: Image.network( dashboardProvider.eventActivity?.shortImageURL ?? "", fit: BoxFit.cover, - )), + key: UniqueKey() + ).paddingAll(5)), Expanded( flex: AppState().isArabic(context) ? 4 : 5, child: SizedBox( diff --git a/lib/ui/screens/event_activity/activity_event_card.dart b/lib/ui/screens/event_activity/activity_event_card.dart index 5c02971..56450b5 100644 --- a/lib/ui/screens/event_activity/activity_event_card.dart +++ b/lib/ui/screens/event_activity/activity_event_card.dart @@ -35,13 +35,16 @@ class ActivityEventDetailsCard extends StatelessWidget { children: [ CachedNetworkImage( imageUrl: model.eventActivity!.detailImageURL!, + height: 200, placeholder: (BuildContext context, String url) => const LinearProgressIndicator( value: 0.7, minHeight: 200, + valueColor: AlwaysStoppedAnimation(Colors.white), backgroundColor: Color(0xff196D73), ).toShimmer(), - fit: BoxFit.cover,width: double.infinity , + fit: BoxFit.contain,width: double.infinity , + cacheKey: UniqueKey().toString(), ), ], From 5adc2bc64fe5b1a0c2202bc3b363fb2ab22a79fd Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 6 Feb 2025 11:23:58 +0300 Subject: [PATCH 09/10] updates --- lib/app_state/app_state.dart | 2 +- lib/ui/login/login_screen.dart | 8 ++++---- lib/ui/unsafe_device_screen.dart | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/app_state/app_state.dart b/lib/app_state/app_state.dart index aea9251..7269cd5 100644 --- a/lib/app_state/app_state.dart +++ b/lib/app_state/app_state.dart @@ -90,7 +90,7 @@ class AppState { String get getHuaweiPushToken => _huaweiPushToken; - final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 8.3, mobileType: Platform.isAndroid ? "android" : "ios"); + final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 8.6, mobileType: Platform.isAndroid ? "android" : "ios"); void setPostParamsInitConfig() { diff --git a/lib/ui/login/login_screen.dart b/lib/ui/login/login_screen.dart index 2aa2da3..13d8853 100644 --- a/lib/ui/login/login_screen.dart +++ b/lib/ui/login/login_screen.dart @@ -88,9 +88,9 @@ class _LoginScreenState extends State { if (Platform.isAndroid) { // isOnExternalStorage = await SafeDevice.isOnExternalStorage; - SafeDevice.isDevelopmentModeEnable.then((value) { - isDevelopmentModeEnable = value; - }); + // SafeDevice.isDevelopmentModeEnable.then((value) { + // isDevelopmentModeEnable = value; + // }); } } catch (error) { print(error); @@ -127,7 +127,7 @@ class _LoginScreenState extends State { } AppNotifications().init(firebaseToken, context); - if (isJailBroken || !isRealDevice || isDevelopmentModeEnable) { + if (isJailBroken || !isRealDevice) { Utils.hideLoading(context); Navigator.pushNamedAndRemoveUntil(context, AppRoutes.unsafeDeviceScreen, (_) => false); } else { diff --git a/lib/ui/unsafe_device_screen.dart b/lib/ui/unsafe_device_screen.dart index c8e1243..dcfe820 100644 --- a/lib/ui/unsafe_device_screen.dart +++ b/lib/ui/unsafe_device_screen.dart @@ -37,10 +37,10 @@ class _UnsafeDeviceScreenState extends State { .paddingOnly(left: 20.0, right: 20.0), 48.height, passwordConstraintsUI("The device is not jailbroken or rooted.", true).paddingOnly(left: 24.0, right: 5.0), - 8.height, - passwordConstraintsUI("The app is not installed on external storage.", true).paddingOnly(left: 24.0, right: 5.0), - 8.height, - passwordConstraintsUI("Development mode is disabled.", true).paddingOnly(left: 24.0, right: 5.0), + // 8.height, + // passwordConstraintsUI("The app is not installed on external storage.", true).paddingOnly(left: 24.0, right: 5.0), + // 8.height, + // passwordConstraintsUI("Development mode is disabled.", true).paddingOnly(left: 24.0, right: 5.0), 21.height, DefaultButton(LocaleKeys.ok.tr(), () async { if (Platform.isAndroid) { From 92a16381aa38f854d699a3efe0c67ae8065aed50 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 6 Feb 2025 12:13:01 +0300 Subject: [PATCH 10/10] Update to stores VersionID 8.6 --- lib/classes/consts.dart | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index c2772b8..fea9b75 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -9,9 +9,9 @@ class ApiConsts { // static String baseUrl = "https://webservices.hmg.com"; // PreProd // static String baseUrl = "https://hmgwebservices.com"; // Live server - // static String baseUrl = "https://mohemm.hmg.com"; // New Live server + static String baseUrl = "https://mohemm.hmg.com"; // New Live server // - static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver + // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver // static String baseUrl = "http://10.20.200.111:1010/"; // static String baseUrl = "https://webservices.hmg.com"; // PreProd diff --git a/pubspec.yaml b/pubspec.yaml index 9740e7d..e23c069 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html #version: 3.3.01+300040 -version: 3.7.98+3 +version: 3.7.992+1 environment: sdk: ">=2.16.0 <3.0.0"