diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 78e1a4a1..9eef1012 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -42,7 +42,13 @@ - + + + + + + + diff --git a/assets/images/new/services/audio_call.svg b/assets/images/new/services/audio_call.svg new file mode 100644 index 00000000..ff22a105 --- /dev/null +++ b/assets/images/new/services/audio_call.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/new/services/phone_call.svg b/assets/images/new/services/phone_call.svg new file mode 100644 index 00000000..10dbdbd7 --- /dev/null +++ b/assets/images/new/services/phone_call.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/new/services/video_call.svg b/assets/images/new/services/video_call.svg new file mode 100644 index 00000000..32579918 --- /dev/null +++ b/assets/images/new/services/video_call.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/svg/download_1.svg b/assets/images/svg/download_1.svg new file mode 100644 index 00000000..8f464826 --- /dev/null +++ b/assets/images/svg/download_1.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index a0e392a9..070ac0c9 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -583,7 +583,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -601,7 +601,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.6.004; + MARKETING_VERSION = 4.6.015; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -735,7 +735,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -753,7 +753,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.6.004; + MARKETING_VERSION = 4.6.015; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -779,7 +779,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -797,7 +797,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.6.004; + MARKETING_VERSION = 4.6.015; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 725870e1..c45d76e8 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -41,7 +41,7 @@ { void openAppLink(Uri uri) { print("the uri is $uri"); - DeepLinkHandler.instance.handleDeepLinkAndNavigation( - locator().navigatorKey.currentState, uri, context); + DeepLinkHandler.instance.handleDeepLinkAndNavigation(locator().navigatorKey.currentState, uri, context); } @override @@ -175,40 +173,41 @@ class _MyApp extends State { ChangeNotifierProvider(create: (context) => PayfortViewModel()), ], child: Consumer( - builder: (context, projectProvider, child) => MaterialApp( - builder: (context, mchild) { - AppGlobal.projectViewModelContext = context; - return MediaQuery( - data: MediaQuery.of(context).copyWith( - textScaler: TextScaler.linear(1.0), - ), //set desired text scale factor here - child: mchild!); - // Container( - // color: Colors.blue, - // )); - }, - navigatorKey: locator().navigatorKey, - showSemanticsDebugger: false, - title: 'Dr. AlHabib', - locale: projectProvider.appLocal, - localizationsDelegates: [ - TranslationBaseDelegate(), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - supportedLocales: [ - const Locale('ar', ''), // Arabic - const Locale('en', ''), // English - ], - theme: Provider.of(context).getTheme(), - initialRoute: SPLASH, - // initialRoute: CALL_PAGE, - // initialRoute: OPENTOK_CALL_PAGE, - // initialRoute: PACKAGES_OFFERS, - // initialRoute: PACKAGES_ORDER_COMPLETED, - routes: routes, - debugShowCheckedModeBanner: false, + builder: (context, projectProvider, child) => SafeArea( + top: false, // Set to true if you want to avoid the notch area as well + bottom: Platform.isIOS ? false : true, + child: MaterialApp( + builder: (context, mchild) { + AppGlobal.projectViewModelContext = context; + return MediaQuery( + data: MediaQuery.of(context).copyWith( + textScaler: TextScaler.linear(1.0), + ), //set desired text scale factor here + child: mchild!); + }, + navigatorKey: locator().navigatorKey, + showSemanticsDebugger: false, + title: 'Dr. AlHabib', + locale: projectProvider.appLocal, + localizationsDelegates: [ + TranslationBaseDelegate(), + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], + supportedLocales: [ + const Locale('ar', ''), // Arabic + const Locale('en', ''), // English + ], + theme: Provider.of(context).getTheme(), + initialRoute: SPLASH, + // initialRoute: CALL_PAGE, + // initialRoute: OPENTOK_CALL_PAGE, + // initialRoute: PACKAGES_OFFERS, + // initialRoute: PACKAGES_ORDER_COMPLETED, + routes: routes, + debugShowCheckedModeBanner: false, + ), ), ), ); diff --git a/lib/pages/BookAppointment/components/search_by_hospital_name.dart b/lib/pages/BookAppointment/components/search_by_hospital_name.dart index 6d97c060..8d33cb82 100644 --- a/lib/pages/BookAppointment/components/search_by_hospital_name.dart +++ b/lib/pages/BookAppointment/components/search_by_hospital_name.dart @@ -51,9 +51,16 @@ class _SearchByHospitalState extends State { @override void initState() { WidgetsBinding.instance.addPostFrameCallback((_) { - locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); - locationUtils.getCurrentLocation(); - getProjectsList(); + // locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + // locationUtils.getCurrentLocation(); + // getProjectsList(); + locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context); + locationUtils.getCurrentLocation(callBack: (_) { + getProjectsList(); + }, onConsentDeclined: () { + getProjectsList(); + }); + // getProjectsList(); }); } @@ -303,13 +310,13 @@ class _SearchByHospitalState extends State { GifLoaderDialogUtils.hideDialog(context); } else {} GifLoaderDialogUtils.hideDialog(context); - locationUtils.getCurrentLocation(); + // locationUtils.getCurrentLocation(); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - locationUtils.getCurrentLocation(); + // locationUtils.getCurrentLocation(); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - locationUtils.getCurrentLocation(); + // locationUtils.getCurrentLocation(); print(err); }); } diff --git a/lib/pages/livecare/livecare_call_type_select.dart b/lib/pages/livecare/livecare_call_type_select.dart index 4b0de7d3..dba20a11 100644 --- a/lib/pages/livecare/livecare_call_type_select.dart +++ b/lib/pages/livecare/livecare_call_type_select.dart @@ -132,8 +132,8 @@ class _LiveCareCallTypeSelectPageState extends State TranslationBase.of(context).next, () { if (mobileNo.isNotEmpty) { - widget.onSelectedMethod(selectedCallType, mobileNo); Navigator.pop(context, [selectedCallType, mobileNo]); + widget.onSelectedMethod(selectedCallType, mobileNo); } else { AppToast.showErrorToast(message: TranslationBase.of(context).enterMobileNumber); } diff --git a/lib/pages/videocall-webrtc-rnd/js_wrapper/multistreammixer-wrapper.dart b/lib/pages/videocall-webrtc-rnd/js_wrapper/multistreammixer-wrapper.dart index b21a345d..3ca46bfa 100644 --- a/lib/pages/videocall-webrtc-rnd/js_wrapper/multistreammixer-wrapper.dart +++ b/lib/pages/videocall-webrtc-rnd/js_wrapper/multistreammixer-wrapper.dart @@ -1,15 +1,15 @@ -@JS() -library streammixer.js; -import 'package:js/js.dart'; - - -@JS('multiStreamsMixerFlutter') -external initMultiStreamsMixer(arrayOfMediaStreams); - -@JS("MultiStreamsMixer") -class MultiStreamsMixer { - external MultiStreamsMixer(arrayOfMediaStreams, elementClass); - - external getMixedStream(); - external start(); -} \ No newline at end of file +// @JS() +// library streammixer.js; +// import 'package:js/js.dart'; +// +// +// @JS('multiStreamsMixerFlutter') +// external initMultiStreamsMixer(arrayOfMediaStreams); +// +// @JS("MultiStreamsMixer") +// class MultiStreamsMixer { +// external MultiStreamsMixer(arrayOfMediaStreams, elementClass); +// +// external getMixedStream(); +// external start(); +// } \ No newline at end of file diff --git a/lib/uitl/location_util.dart b/lib/uitl/location_util.dart index 13749be1..f211836b 100644 --- a/lib/uitl/location_util.dart +++ b/lib/uitl/location_util.dart @@ -24,7 +24,7 @@ class LocationUtils { LocationUtils({required this.isShowConfirmDialog, required this.context, this.isHuawei = false, this.isShowLocationTimeoutDialog = true}); - void getCurrentLocation({Function(LatLng)? callBack}) async { + void getCurrentLocation({Function(LatLng)? callBack, VoidCallback? onConsentDeclined}) async { if (Platform.isAndroid && isHuawei) { _getHMSCurrentLocation(callBack!); } else { @@ -32,15 +32,18 @@ class LocationUtils { if (value) { await Geolocator.checkPermission().then((permission) async { if (permission == LocationPermission.always || permission == LocationPermission.whileInUse) { - Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 5)).then((value) { + // Geolocator.getCurrentPosition(locationSettings: LocationSettings(accuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 5))).then((value) { + Geolocator.getLastKnownPosition().then((value) { setLocation(value); - if (callBack != null) callBack(LatLng(value.latitude, value.longitude)); + if (callBack != null) callBack(LatLng(value?.latitude ?? 0.0, value?.longitude ?? 0.0)); }).catchError((err) { print(err); if (isShowConfirmDialog && isShowLocationTimeoutDialog) { showLocationTimeOutDialog(failureCallBack: () { Geolocator.openAppSettings(); }); + } else { + onConsentDeclined?.call(); } }); } @@ -50,13 +53,16 @@ class LocationUtils { Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () async { final hasPermission = await _handlePermission(); if (hasPermission) { - Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 10)).then((value) { + // Geolocator.getCurrentPosition(locationSettings: LocationSettings(accuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 5))).then((value) { + Geolocator.getLastKnownPosition().then((value) { setLocation(value); - if (callBack != null) callBack(LatLng(value.latitude, value.longitude)); + if (callBack != null) callBack(LatLng(value?.latitude ?? 0.0, value?.longitude ?? 0.0)); }); } else { if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: () {}); } + }, onConsentDeclined: () { + onConsentDeclined?.call(); }); } else { if (await Permission.location.request().isGranted) { @@ -81,20 +87,14 @@ class LocationUtils { Future checkIfGPSIsEnabled() async { if (Platform.isAndroid && isHuawei) { - FusedLocationProviderClient locationService = - FusedLocationProviderClient(); + FusedLocationProviderClient locationService = FusedLocationProviderClient(); LocationRequest locationRequest = LocationRequest(); locationRequest.priority = LocationRequest.PRIORITY_HIGH_ACCURACY; locationRequest.interval = 1000; - List locationRequestList = [ - locationRequest - ]; - LocationSettingsRequest locationSettingsRequest = - LocationSettingsRequest(requests: locationRequestList); + List locationRequestList = [locationRequest]; + LocationSettingsRequest locationSettingsRequest = LocationSettingsRequest(requests: locationRequestList); bool success = false; - locationService - .checkLocationSettings(locationSettingsRequest) - .then((settings) { + locationService.checkLocationSettings(locationSettingsRequest).then((settings) { success = true; }); return success; @@ -238,8 +238,7 @@ class LocationUtils { this.sharedPref.setDouble(USER_LAT, position?.latitude ?? 0.0); this.sharedPref.setDouble(USER_LONG, position?.longitude ?? 0.0); ProjectViewModel projectViewModel = Provider.of(context, listen: false); - projectViewModel.setLatitudeLongitude( - position?.latitude ?? 0.0, position?.longitude ?? 0.0); + projectViewModel.setLatitudeLongitude(position?.latitude ?? 0.0, position?.longitude ?? 0.0); } void setZeroLocation() { diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 4bf09b73..dde9c7a4 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -137,7 +137,7 @@ class Utils { FocusScope.of(context).unfocus(); } - static showPermissionConsentDialog(BuildContext context, String message, VoidCallback? onTap) { + static showPermissionConsentDialog(BuildContext context, String message, VoidCallback? onTap, {VoidCallback? onConsentDeclined}) { showDialog( context: context, builder: (cxt) => CovidConsentDialog( @@ -145,6 +145,7 @@ class Utils { title: TranslationBase.of(context).covidConsentHeader, message: message, onTap: onTap!, + onConsentDeclined: onConsentDeclined!, )); } diff --git a/lib/widgets/dialogs/covid_consent_dialog.dart b/lib/widgets/dialogs/covid_consent_dialog.dart index bf052769..c2267d40 100644 --- a/lib/widgets/dialogs/covid_consent_dialog.dart +++ b/lib/widgets/dialogs/covid_consent_dialog.dart @@ -8,8 +8,9 @@ class CovidConsentDialog extends StatelessWidget { final String? message; final String? okTitle; final VoidCallback? onTap; + final VoidCallback? onConsentDeclined; - const CovidConsentDialog({Key? key, this.title, @required this.message, this.okTitle, this.onTap}) : super(key: key); + const CovidConsentDialog({Key? key, this.title, @required this.message, this.okTitle, this.onTap, this.onConsentDeclined}) : super(key: key); @override Widget build(BuildContext context) { @@ -42,6 +43,7 @@ class CovidConsentDialog extends StatelessWidget { constraints: BoxConstraints(), onPressed: () { Navigator.pop(context); + onConsentDeclined?.call(); }, ) ], @@ -57,7 +59,10 @@ class CovidConsentDialog extends StatelessWidget { Expanded( child: DefaultButton( TranslationBase.of(context).declineLbl, - () => Navigator.pop(context), + () { + Navigator.pop(context); + onConsentDeclined?.call(); + }, textColor: Colors.white, color: CustomColors.accentColor, ), @@ -66,7 +71,7 @@ class CovidConsentDialog extends StatelessWidget { Expanded( child: DefaultButton( okTitle ?? TranslationBase.of(context).ok, - () { + () { Navigator.pop(context); onTap!(); }, diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index c2afb8d2..e4697472 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/lib/widgets/new_design/doctor_header.dart b/lib/widgets/new_design/doctor_header.dart index 6da60f24..ae0cfc32 100644 --- a/lib/widgets/new_design/doctor_header.dart +++ b/lib/widgets/new_design/doctor_header.dart @@ -187,7 +187,7 @@ class DoctorHeader extends StatelessWidget { child: Row( mainAxisSize: MainAxisSize.min, children: [ - SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0), + SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0, color: Colors.white), SizedBox(width: 4), Text( buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle!, diff --git a/pubspec.yaml b/pubspec.yaml index 07756d8f..2b4fd022 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,8 @@ name: hmg_patient_app description: A new Flutter application. -version: 4.6.009+1 +#version: 4.6.015+2 +version: 4.6.0971+40500971 environment: # sdk: ">=3.0.0 <3.13.0"