From 8862cc6c060b45a851588059b5ff07d3308082fb Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 9 Oct 2024 16:28:58 +0300 Subject: [PATCH] Release issues resolved --- android/app/build.gradle | 2 +- lib/config/config.dart | 4 +- lib/core/service/client/base_app_client.dart | 6 +-- lib/core/viewModels/project_view_model.dart | 2 +- lib/pages/landing/landing_page.dart | 4 +- .../syncHealthData.dart | 54 +++++++++---------- .../permission/permission_service.dart | 10 ++-- lib/widgets/in_app_browser/InAppBrowser.dart | 4 +- pubspec.yaml | 11 ++-- 9 files changed, 49 insertions(+), 48 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 6e7a4b21..b5f2d00f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -73,7 +73,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.ejada.hmg" - minSdkVersion 24 + minSdkVersion 26 targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/lib/config/config.dart b/lib/config/config.dart index 75eac393..16a900ec 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -22,8 +22,8 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; // var BASE_URL = 'http://10.50.100.198:4422/'; -// var BASE_URL = 'https://uat.hmgwebservices.com/'; -var BASE_URL = 'https://hmgwebservices.com/'; +var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 98a884f4..3bd1cf62 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -199,9 +199,9 @@ class BaseAppClient { // } // if (AppGlobal.isNetworkDebugEnabled) { - // print("URL : $url"); - // final jsonBody = json.encode(body); - // print(jsonBody); + print("URL : $url"); + final jsonBody = json.encode(body); + print(jsonBody); // } if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index 61b453a4..2b973e67 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -47,7 +47,7 @@ class ProjectViewModel extends BaseViewModel { GetAdmissionInfoResponseModel getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel(); GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel(); - bool isIndoorNavigationEnabled = false; + bool isIndoorNavigationEnabled = true; void setIsAllAppointmentsLoaded(bool value) { _isAllAppointmentsLoaded = value; diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 6fe004fc..0cf6fd2c 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -43,7 +43,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_app_icon_badge/flutter_app_icon_badge.dart'; +// import 'package:flutter_app_icon_badge/flutter_app_icon_badge.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart'; @@ -664,7 +664,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); model.setState(model.count, 0, true, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount); - FlutterAppIconBadge.updateBadge(int.parse(notificationCount)); + // FlutterAppIconBadge.updateBadge(int.parse(notificationCount)); } }); // if (await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN) == null || !await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN)) { diff --git a/lib/pages/medical/smart_watch_health_data/syncHealthData.dart b/lib/pages/medical/smart_watch_health_data/syncHealthData.dart index e6ec5c9a..6d6fdf4f 100644 --- a/lib/pages/medical/smart_watch_health_data/syncHealthData.dart +++ b/lib/pages/medical/smart_watch_health_data/syncHealthData.dart @@ -34,7 +34,7 @@ class _syncHealthDataButtonState extends State { int MedCategoryID = 0; - HealthFactory health = HealthFactory(); + // HealthFactory health = HealthFactory(); List types = [HealthDataType.STEPS, HealthDataType.HEART_RATE, Platform.isAndroid ? HealthDataType.DISTANCE_DELTA : HealthDataType.DISTANCE_WALKING_RUNNING]; @override @@ -48,29 +48,29 @@ class _syncHealthDataButtonState extends State { } checkPermissions() async { - if (Platform.isAndroid) { - if (await PermissionService.isHealthDataPermissionEnabled()) { - await health.requestAuthorization(types).then((value) { - if (value) { - readAll(); - } - }); - } else { - Utils.showPermissionConsentDialog(context, TranslationBase.of(context).physicalActivityPermission, () async { - await health.requestAuthorization(types).then((value) { - if (value) { - readAll(); - } - }); - }); - } - } else { - await health.requestAuthorization(types).then((value) { - if (value) { - readAll(); - } - }); - } + // if (Platform.isAndroid) { + // if (await PermissionService.isHealthDataPermissionEnabled()) { + // await health.requestAuthorization(types).then((value) { + // if (value) { + // readAll(); + // } + // }); + // } else { + // Utils.showPermissionConsentDialog(context, TranslationBase.of(context).physicalActivityPermission, () async { + // await health.requestAuthorization(types).then((value) { + // if (value) { + // readAll(); + // } + // }); + // }); + // } + // } else { + // await health.requestAuthorization(types).then((value) { + // if (value) { + // readAll(); + // } + // }); + // } } void readAll() async { @@ -83,13 +83,13 @@ class _syncHealthDataButtonState extends State { DateTime startDate = DateTime.now().subtract(new Duration(days: 30)); try { - List healthData = await health.getHealthDataFromTypes(startDate, DateTime.now(), types); - _healthDataList.addAll(healthData); + // List healthData = await health.getHealthDataFromTypes(startDate, DateTime.now(), types); + // _healthDataList.addAll(healthData); } catch (e) { print("Caught exception in getHealthDataFromTypes: $e"); } - _healthDataList = HealthFactory.removeDuplicates(_healthDataList); + // _healthDataList = HealthFactory.removeDuplicates(_healthDataList); _healthDataList.forEach((x) { if (x.type == HealthDataType.STEPS) { diff --git a/lib/services/permission/permission_service.dart b/lib/services/permission/permission_service.dart index 641d6444..cc73c303 100644 --- a/lib/services/permission/permission_service.dart +++ b/lib/services/permission/permission_service.dart @@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:flutter/material.dart'; import 'package:localstorage/localstorage.dart'; import 'package:permission_handler/permission_handler.dart'; -import 'package:vibration/vibration.dart'; +// import 'package:vibration/vibration.dart'; import 'package:geolocator/geolocator.dart' as geo; class PermissionService extends BaseService { @@ -25,10 +25,10 @@ class PermissionService extends BaseService { vibrate(callback, context) async { if (callback == null) return null; if (isVibrationEnabled() == true) { - if (await Vibration.hasVibrator() !=null) { - Vibration.vibrate(duration: 100); - callback(); - } + // if (await Vibration.hasVibrator() !=null) { + // Vibration.vibrate(duration: 100); + // callback(); + // } } else { callback(); } diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 6c99b2c6..93a4a0e0 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -38,9 +38,9 @@ class MyInAppBrowser extends InAppBrowser { static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT - static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS diff --git a/pubspec.yaml b/pubspec.yaml index cd45272f..02c894e1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -34,7 +34,8 @@ dependencies: get_it: ^7.2.0 #Google Fit & Apple HealthKit - health: ^3.0.3 +# health: ^3.0.3 + health: ^11.1.0 #chart fl_chart: ^0.64.0 @@ -109,7 +110,7 @@ dependencies: manage_calendar_events: ^2.0.3 #InAppBrowser - flutter_inappwebview: ^6.1.0+1 + flutter_inappwebview: ^6.1.5 #Circular progress bar for reverse timer circular_countdown_timer: ^0.2.0 @@ -124,7 +125,7 @@ dependencies: flutter_datetime_picker_plus: ^2.1.0 carousel_pro_nullsafety: ^2.0.0 flutter_local_notifications: any - device_calendar: ^4.3.2 + device_calendar: ^4.3.3 geolocator: ^9.0.2 geocoding: ^2.0.1 jiffy: ^6.2.1 @@ -143,7 +144,7 @@ dependencies: after_layout: ^1.1.0 cached_network_image: ^3.3.0 flutter_tts: ^3.6.1 - vibration: ^1.7.3 +# vibration: ^1.7.3 flutter_nfc_kit: ^3.3.1 #geofencing: any speech_to_text: ^6.1.1 @@ -153,7 +154,7 @@ dependencies: in_app_review: ^2.0.3 badges: ^3.1.2 - flutter_app_icon_badge: ^2.0.0 +# flutter_app_icon_badge: ^2.0.0 # dropdown_search: 5.0.6 youtube_player_flutter: ^9.1.0