From 243da0c775cef79372d68e181c1e2cf33c0e3cfa Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 13 Dec 2022 11:57:22 +0300 Subject: [PATCH 1/2] fixes --- lib/widgets/item_detail_view_widget.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/item_detail_view_widget.dart b/lib/widgets/item_detail_view_widget.dart index ccdedea..77d959b 100644 --- a/lib/widgets/item_detail_view_widget.dart +++ b/lib/widgets/item_detail_view_widget.dart @@ -39,7 +39,7 @@ class ItemDetailViewCol extends StatelessWidget { children: [ "$title:".toText12(isBold: true, color: const Color(0xff2BB8A6), maxLine: 2), 4.width, - (value.isEmpty ? "--" : value).toText12(color: MyColors.normalTextColor, maxLine: 2), + (value.isEmpty ? "--" : value).toText12(color: MyColors.normalTextColor, maxLine: 5), ], ); } From a39e6808d71cde79e81f9befcf5fa0e0d9f14be1 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 13 Dec 2022 12:20:55 +0300 Subject: [PATCH 2/2] fixes & updates --- lib/api/marathon/marathon_api_client.dart | 1 - lib/api/monthly_attendance_api_client.dart | 2 -- lib/api/monthly_pay_slip_api_client.dart | 1 - lib/api/my_attendance_api_client.dart | 1 - lib/api/my_team/my_team_api_client.dart | 2 -- lib/api/profile_api_client.dart | 8 -------- lib/api/termination_dff_api_client.dart | 3 --- lib/classes/utils.dart | 1 - lib/ui/chat/chat_home_screen.dart | 12 +++++------- lib/ui/landing/today_attendance_screen.dart | 2 -- lib/ui/login/verify_login_screen.dart | 3 --- lib/ui/marathon/marathon_provider.dart | 2 -- lib/ui/profile/basic_details.dart | 5 ++--- lib/ui/profile/delete_family_member.dart | 1 - .../dynamic_input_address_screen.dart | 1 - .../fragments/items_for_sale.dart | 1 - .../fragments/my_posted_ads_fragment.dart | 1 - lib/ui/termination/end_employement.dart | 1 - lib/ui/work_list/itg_detail_screen.dart | 2 -- lib/widgets/chat_app_bar_widge.dart | 8 +------- lib/widgets/mark_attendance_widget.dart | 17 ----------------- lib/widgets/nfc/nfc_reader_sheet.dart | 1 - pubspec.yaml | 2 +- 23 files changed, 9 insertions(+), 69 deletions(-) diff --git a/lib/api/marathon/marathon_api_client.dart b/lib/api/marathon/marathon_api_client.dart index a9266d2..26a0363 100644 --- a/lib/api/marathon/marathon_api_client.dart +++ b/lib/api/marathon/marathon_api_client.dart @@ -30,7 +30,6 @@ class MarathonApiClient { if (marathonModel.statusCode == 200) { if (marathonModel.data != null && marathonModel.isSuccessful == true) { AppState().setMarathonToken = marathonModel.data["token"] ?? ""; - print("bearer: ${AppState().getMarathonToken}"); return marathonModel.data["token"] ?? ""; } else { //TODO : DO ERROR HANDLING HERE diff --git a/lib/api/monthly_attendance_api_client.dart b/lib/api/monthly_attendance_api_client.dart index 00d444f..e462373 100644 --- a/lib/api/monthly_attendance_api_client.dart +++ b/lib/api/monthly_attendance_api_client.dart @@ -29,7 +29,6 @@ class MonthlyAttendanceApiClient { postParams.addAll(AppState().postParamsJson); return await ApiClient().postJsonForObject((json) { GenericResponseModel? responseData = GenericResponseModel.fromJson(json); - print(responseData); return (responseData.getTimeCardSummaryList?.length ?? 0) > 0 ? responseData.getTimeCardSummaryList!.first : null; }, url, postParams); } @@ -49,7 +48,6 @@ class MonthlyAttendanceApiClient { // postParams["DeviceType"] = deviceType; return await ApiClient().postJsonForObject((json) { GenericResponseModel? responseData = GenericResponseModel.fromJson(json); - print(responseData.getDayHoursTypeDetailsList!.length); return responseData.getDayHoursTypeDetailsList ?? []; }, url, postParams); } diff --git a/lib/api/monthly_pay_slip_api_client.dart b/lib/api/monthly_pay_slip_api_client.dart index 95bf847..e3071a4 100644 --- a/lib/api/monthly_pay_slip_api_client.dart +++ b/lib/api/monthly_pay_slip_api_client.dart @@ -19,7 +19,6 @@ class MonthlyPaySlipApiClient { String url = "${ApiConsts.erpRest}GET_PAYSLIP"; Map postParams = {"P_MENU_TYPE": "E", "P_SELECTED_RESP_ID": -999}; postParams.addAll(AppState().postParamsJson); - print(postParams); return await ApiClient().postJsonForObject((json) { GenericResponseModel? responseData = GenericResponseModel.fromJson(json); return responseData.getPayslipList ?? []; diff --git a/lib/api/my_attendance_api_client.dart b/lib/api/my_attendance_api_client.dart index 5833413..0f078a2 100644 --- a/lib/api/my_attendance_api_client.dart +++ b/lib/api/my_attendance_api_client.dart @@ -26,7 +26,6 @@ class MyAttendanceApiClient { if (empID!.isNotEmpty) { postParams['P_SELECTED_EMPLOYEE_NUMBER'] = empID; // AppState().postParamsJson['P_SELECTED_EMPLOYEE_NUMBER'] = empID; - print(empID); } return await ApiClient().postJsonForObject((json) { GenericResponseModel? responseData = GenericResponseModel.fromJson(json); diff --git a/lib/api/my_team/my_team_api_client.dart b/lib/api/my_team/my_team_api_client.dart index 17a0a90..df635b0 100644 --- a/lib/api/my_team/my_team_api_client.dart +++ b/lib/api/my_team/my_team_api_client.dart @@ -64,7 +64,6 @@ class MyTeamApiClient { postParams['P_SELECTED_EMPLOYEE_NUMBER'] = empID; return await ApiClient().postJsonForObject((json) { GenericResponseModel? responseData = GenericResponseModel.fromJson(json); - print(responseData.getDayHoursTypeDetailsList!.length); return responseData.getDayHoursTypeDetailsList ?? []; }, url, postParams); } @@ -76,7 +75,6 @@ class MyTeamApiClient { postParams['P_SELECTED_EMPLOYEE_NUMBER'] = empID; return await ApiClient().postJsonForObject((json) { GenericResponseModel? responseData = GenericResponseModel.fromJson(json); - print(responseData.getAttendanceTrackingList); return responseData.getAttendanceTrackingList; }, url, postParams); } diff --git a/lib/api/profile_api_client.dart b/lib/api/profile_api_client.dart index 210d179..6a8cfb0 100644 --- a/lib/api/profile_api_client.dart +++ b/lib/api/profile_api_client.dart @@ -41,7 +41,6 @@ class ProfileApiClient { postParams.addAll(AppState().postParamsJson); return await ApiClient().postJsonForObject((json) { GenericResponseModel? responseData = GenericResponseModel.fromJson(json); - print(responseData); return responseData.getEmployeeContactsList ?? []; }, url, postParams); } @@ -258,7 +257,6 @@ class ProfileApiClient { // "EITTransactionTBLModel": list, }; postParams.addAll(AppState().postParamsJson); - print("postParams:$postParams"); postParams["EITTransactionTBL"] = list; postParams["EITTransactionTBLModel"] = list; return await ApiClient().postJsonForObject((json) { @@ -300,7 +298,6 @@ class ProfileApiClient { // "EITTransactionTBLModel": list, }; postParams.addAll(AppState().postParamsJson); - print("postParams:$postParams"); postParams["EITTransactionTBL"] = list; // postParams["EITTransactionTBLModel"] = list; return await ApiClient().postJsonForObject((json) { @@ -389,12 +386,7 @@ class ProfileApiClient { }; postParams.addAll(AppState().postParamsJson); - print("postParam:${json.encode(postParams)}"); postParams["EITTransactionTBL"] = list; - list.forEach((element) { - print(json.encode(element)); - - }); return await ApiClient().postJsonForObject((json) { GenericResponseModel? responseData = GenericResponseModel.fromJson(json); return responseData.submitContactTransactionList; diff --git a/lib/api/termination_dff_api_client.dart b/lib/api/termination_dff_api_client.dart index 0933dea..0d5864f 100644 --- a/lib/api/termination_dff_api_client.dart +++ b/lib/api/termination_dff_api_client.dart @@ -46,9 +46,6 @@ class TerminationDffApiClient { }; postParams.addAll(AppState().postParamsJson); - for (var abc in list) { - print(abc); - } return await ApiClient().postJsonForObject((json) { GenericResponseModel genericResponseModel = GenericResponseModel.fromJson(json); return genericResponseModel.submitTermTransactionList!; diff --git a/lib/classes/utils.dart b/lib/classes/utils.dart index 3be8356..fbdc6ce 100644 --- a/lib/classes/utils.dart +++ b/lib/classes/utils.dart @@ -340,7 +340,6 @@ class Utils { static void readNFc({required Function(String) onRead}) { NfcManager.instance.startSession(onDiscovered: (NfcTag tag) async { - print(tag.data); var f; if (Platform.isAndroid) { f = MifareUltralight(tag: tag, identifier: tag.data["nfca"]["identifier"], type: 2, maxTransceiveLength: 252, timeout: 22); diff --git a/lib/ui/chat/chat_home_screen.dart b/lib/ui/chat/chat_home_screen.dart index a9814ee..395556a 100644 --- a/lib/ui/chat/chat_home_screen.dart +++ b/lib/ui/chat/chat_home_screen.dart @@ -1,5 +1,3 @@ -import 'dart:convert'; -import 'package:animated_text_kit/animated_text_kit.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -139,11 +137,11 @@ class _ChatHomeScreenState extends State { children: [ (m.searchedChats![index].userName!.replaceFirst(".", " ").capitalizeFirstofEach ?? "").toText14(color: MyColors.darkTextColor).paddingOnly(left: 11, top: 13), m.searchedChats![index].isTyping! - ? AnimatedTextKit( - animatedTexts: [ - ScaleAnimatedText('Typing...', textStyle: const TextStyle(color: MyColors.textMixColor, fontSize: 10, letterSpacing: -0.4, fontStyle: FontStyle.normal)), - ], - ).paddingOnly(left: 11) + ? 'Typing...' + .toText10( + color: MyColors.textMixColor, + ) + .paddingOnly(left: 11.0) : const SizedBox() //(m.searchedChats![index].isTyping! ? "Typing ..." : "").toText10(color: MyColors.textMixColor).paddingOnly(left: 11, top: 0), ], diff --git a/lib/ui/landing/today_attendance_screen.dart b/lib/ui/landing/today_attendance_screen.dart index d23fa10..ea3ae24 100644 --- a/lib/ui/landing/today_attendance_screen.dart +++ b/lib/ui/landing/today_attendance_screen.dart @@ -41,8 +41,6 @@ class _TodayAttendanceScreenState extends State { bool isAvailable = await NfcManager.instance.isAvailable(); setState(() { AppState().privilegeListModel!.forEach((element) { - print(element.serviceName.toString() + " " + element.previlege.toString()); // Check availability - if (element.serviceName == "enableNFC") { if (isAvailable) if (element.previlege ?? false) isNfcEnabled = true; } else if (element.serviceName == "enableQR") { diff --git a/lib/ui/login/verify_login_screen.dart b/lib/ui/login/verify_login_screen.dart index b5eb7df..803f3d9 100644 --- a/lib/ui/login/verify_login_screen.dart +++ b/lib/ui/login/verify_login_screen.dart @@ -636,9 +636,6 @@ class _VerifyLoginScreenState extends State { AppState().setPrivilegeListModel = genericResponseModel!.privilegeList ?? []; AppState().setMemberInformationListModel = genericResponseModel.memberInformationList?.first; MemberInformationListModel.saveToPrefs(genericResponseModel.memberInformationList ?? []); - genericResponseModel.privilegeList!.forEach((element) { - print(element.serviceName.toString() + " " + element.previlege.toString()); // Check availability - }); PrivilegeListModel.saveToPrefs(genericResponseModel.privilegeList ?? []); AppState().setMohemmWifiSSID = genericResponseModel.mohemmWifiSSID; AppState().setMohemmWifiPassword = genericResponseModel.mohemmWifiPassword; diff --git a/lib/ui/marathon/marathon_provider.dart b/lib/ui/marathon/marathon_provider.dart index 175b7be..c5b1cd7 100644 --- a/lib/ui/marathon/marathon_provider.dart +++ b/lib/ui/marathon/marathon_provider.dart @@ -242,7 +242,6 @@ class MarathonProvider extends ChangeNotifier { selectedWinners = await MarathonApiClient().getSelectedWinner(marathonId: marathonDetailModel.id!); if (selectedWinners != null) { selectedWinners!.removeWhere((WinnerModel element) { - print("matching : ${AppState().memberInformationList!.eMPLOYEENUMBER} with ${element.employeeId}"); if (element.employeeId == AppState().memberInformationList!.eMPLOYEENUMBER) { iAmWinner = true; return true; @@ -251,7 +250,6 @@ class MarathonProvider extends ChangeNotifier { } }); } - print("selectedWinners Length : ${selectedWinners!.length}"); notifyListeners(); } diff --git a/lib/ui/profile/basic_details.dart b/lib/ui/profile/basic_details.dart index c91adb5..42ecf1d 100644 --- a/lib/ui/profile/basic_details.dart +++ b/lib/ui/profile/basic_details.dart @@ -44,13 +44,12 @@ class _BasicDetailsState extends State { super.initState(); memberInformationList = AppState().memberInformationList!; List menuData = Provider.of(context, listen: false).getMenuEntriesList!; - for( int i=0;i e.requestType == 'BASIC_DETAILS').toList(); - if(filterList.isNotEmpty) { + if (filterList.isNotEmpty) { menuEntries = filterList.first; } diff --git a/lib/ui/profile/delete_family_member.dart b/lib/ui/profile/delete_family_member.dart index 73c44de..16052f8 100644 --- a/lib/ui/profile/delete_family_member.dart +++ b/lib/ui/profile/delete_family_member.dart @@ -37,7 +37,6 @@ class _DeleteFamilyMemberState extends State { //int? relationId; @override void initState() { - print(widget.relationId); super.initState(); } diff --git a/lib/ui/profile/dynamic_screens/dynamic_input_address_screen.dart b/lib/ui/profile/dynamic_screens/dynamic_input_address_screen.dart index a233839..77b2abd 100644 --- a/lib/ui/profile/dynamic_screens/dynamic_input_address_screen.dart +++ b/lib/ui/profile/dynamic_screens/dynamic_input_address_screen.dart @@ -294,7 +294,6 @@ class _DynamicInputScreenState extends State { countryCode, effectiveDate.isEmpty ? DateFormat('dd-MMM-yyy').format(DateTime.now()) : effectiveDate, ); - print(values); Utils.hideLoading(context); Navigator.pushNamed(context, AppRoutes.requestSubmitScreen, diff --git a/lib/ui/screens/items_for_sale/fragments/items_for_sale.dart b/lib/ui/screens/items_for_sale/fragments/items_for_sale.dart index 50a89cc..ae715fe 100644 --- a/lib/ui/screens/items_for_sale/fragments/items_for_sale.dart +++ b/lib/ui/screens/items_for_sale/fragments/items_for_sale.dart @@ -39,7 +39,6 @@ class _ItemsForSaleFragmentState extends State { if (gridScrollController.position.atEdge) { bool isTop = gridScrollController.position.pixels == 0; if (!isTop && getItemsForSaleList.length == currentPageNo * 10) { - print('At the bottom'); currentPageNo++; getItemsForSale(currentPageNo, currentCategoryID); } diff --git a/lib/ui/screens/items_for_sale/fragments/my_posted_ads_fragment.dart b/lib/ui/screens/items_for_sale/fragments/my_posted_ads_fragment.dart index f477672..64b8bf9 100644 --- a/lib/ui/screens/items_for_sale/fragments/my_posted_ads_fragment.dart +++ b/lib/ui/screens/items_for_sale/fragments/my_posted_ads_fragment.dart @@ -193,7 +193,6 @@ class _MyPostedAdsFragmentState extends State { Utils.hideLoading(context); Utils.handleException(e, context, null); }); - print(response.statusCode); Utils.hideLoading(context); getAdsByEmployee(); } diff --git a/lib/ui/termination/end_employement.dart b/lib/ui/termination/end_employement.dart index 6fbfa61..73e8f79 100644 --- a/lib/ui/termination/end_employement.dart +++ b/lib/ui/termination/end_employement.dart @@ -255,7 +255,6 @@ class _EndEmploymentScreenState extends State { ], onSelected: (int popipIndex) async { termColObject.selectedObjectValue = termColObject.objectValuesList![popipIndex]; - print(termColObject.selectedObjectValue?.toJson()); setState(() {}); }); } diff --git a/lib/ui/work_list/itg_detail_screen.dart b/lib/ui/work_list/itg_detail_screen.dart index e123d22..ebe16c8 100644 --- a/lib/ui/work_list/itg_detail_screen.dart +++ b/lib/ui/work_list/itg_detail_screen.dart @@ -352,7 +352,6 @@ class _ItgDetailScreenState extends State { } void handleFabAction(AllowedActions action) { - print(action.toJson()); switch (action.action) { case "Delegate": showMyBottomSheet(context, @@ -461,7 +460,6 @@ class _ItgDetailScreenState extends State { } void performAction(String actionMode) { - print(actionMode); showDialog( context: context, builder: (cxt) => ITGCommentsDialog( diff --git a/lib/widgets/chat_app_bar_widge.dart b/lib/widgets/chat_app_bar_widge.dart index 0feac6c..a67ae7d 100644 --- a/lib/widgets/chat_app_bar_widge.dart +++ b/lib/widgets/chat_app_bar_widge.dart @@ -1,4 +1,3 @@ -import 'package:animated_text_kit/animated_text_kit.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:mohem_flutter_app/classes/colors.dart'; @@ -51,12 +50,7 @@ AppBar ChatAppBarWidget(BuildContext context, Consumer( builder: (BuildContext cxt, ChatProviderModel data, Widget? child) { if (chatUser!.isTyping!) { - // return ("Typing ...").toText10(color: MyColors.textMixColor); - return AnimatedTextKit( - animatedTexts: [ - ScaleAnimatedText('Typing...', textStyle: const TextStyle(color: MyColors.textMixColor, fontSize: 10, letterSpacing: -0.4, fontStyle: FontStyle.normal)), - ], - ); + return ("Typing ...").toText10(color: MyColors.textMixColor); } else { return const SizedBox(); } diff --git a/lib/widgets/mark_attendance_widget.dart b/lib/widgets/mark_attendance_widget.dart index a6b6cfc..9840700 100644 --- a/lib/widgets/mark_attendance_widget.dart +++ b/lib/widgets/mark_attendance_widget.dart @@ -48,8 +48,6 @@ class _MarkAttendanceWidgetState extends State { bool isAvailable = await NfcManager.instance.isAvailable(); setState(() { AppState().privilegeListModel!.forEach((element) { - print(element.serviceName.toString() + " " + element.previlege.toString()); // Check availability - if (element.serviceName == "enableNFC") { if (isAvailable) if (element.previlege ?? false) isNfcEnabled = true; } else if (element.serviceName == "enableQR") { @@ -76,7 +74,6 @@ class _MarkAttendanceWidgetState extends State { @override Widget build(BuildContext context) { - print(MediaQuery.of(context).size.width); return Container( padding: EdgeInsets.only(left: 21, right: 21, bottom: 21, top: widget.topPadding), decoration: const BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white), @@ -134,12 +131,6 @@ class _MarkAttendanceWidgetState extends State { } Future performNfcAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async { - if (isNfcLocationEnabled) { - print("nfc location enabled"); - } else { - print("nfc not location enabled"); - } - if (Platform.isIOS) { Utils.readNFc(onRead: (String nfcId) async { Utils.showLoading(context); @@ -177,7 +168,6 @@ class _MarkAttendanceWidgetState extends State { }); } else { showNfcReader(context, onNcfScan: (String? nfcId) async { - print(nfcId); Utils.showLoading(context); try { GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 2, nfcValue: nfcId ?? "", isGpsRequired: isNfcLocationEnabled, lat: lat, long: lng); @@ -214,12 +204,6 @@ class _MarkAttendanceWidgetState extends State { } Future performWifiAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async { - if (isWifiLocationEnabled) { - print("wifi location enabled"); - } else { - print("wifi not location enabled"); - } - Utils.showLoading(context); bool isConnected = await WiFiForIoTPlugin.connect(AppState().getMohemmWifiSSID ?? "", password: AppState().getMohemmWifiPassword ?? "", joinOnce: Platform.isIOS ? false : true, security: NetworkSecurity.WPA, withInternet: false); @@ -271,7 +255,6 @@ class _MarkAttendanceWidgetState extends State { ), ); if (qrCodeValue != null) { - print("qrCode: " + qrCodeValue); Utils.showLoading(context); try { GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 1, isGpsRequired: isQrLocationEnabled, lat: lat, long: lng, QRValue: qrCodeValue); diff --git a/lib/widgets/nfc/nfc_reader_sheet.dart b/lib/widgets/nfc/nfc_reader_sheet.dart index 4ac055b..b7b97a7 100644 --- a/lib/widgets/nfc/nfc_reader_sheet.dart +++ b/lib/widgets/nfc/nfc_reader_sheet.dart @@ -41,7 +41,6 @@ class _NfcLayoutState extends State { super.initState(); NfcManager.instance.startSession(onDiscovered: (NfcTag tag) async { - print(tag.data); var f; if (Platform.isAndroid) { f = MifareUltralight(tag: tag, identifier: tag.data["nfca"]["identifier"], type: 2, maxTransceiveLength: 252, timeout: 22); diff --git a/pubspec.yaml b/pubspec.yaml index 2e3c4c2..086ec65 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -92,7 +92,7 @@ dependencies: swipe_to: ^1.0.2 flutter_webrtc: ^0.9.16 camera: ^0.10.0+4 - animated_text_kit: ^4.2.2 +# animated_text_kit: ^4.2.2 #Encryption flutter_des: ^2.1.0