diff --git a/assets/images/svg/confirm.svg b/assets/images/svg/confirm.svg index 5ed3693..62cfa01 100755 --- a/assets/images/svg/confirm.svg +++ b/assets/images/svg/confirm.svg @@ -1,3 +1,3 @@ -add_ + diff --git a/lib/core/cache_consts.dart b/lib/core/cache_consts.dart index 8deb8bd..c1e06aa 100644 --- a/lib/core/cache_consts.dart +++ b/lib/core/cache_consts.dart @@ -75,6 +75,7 @@ class CacheConst { static const String patientOccupationList = 'patient-occupation-list'; static const String hasEnabledQuickLogin = 'has-enabled-quick-login'; static const String quickLoginEnabled = 'quick-login-enabled'; + static const String isMonthlyReportEnabled = 'is-monthly-report-enabled'; static const String zoomRoomID = 'zoom-room-id'; static String isAppOpenedFromCall = "is_app_opened_from_call"; diff --git a/lib/core/dependencies.dart b/lib/core/dependencies.dart index c6c5554..ebf0a84 100644 --- a/lib/core/dependencies.dart +++ b/lib/core/dependencies.dart @@ -30,6 +30,8 @@ import 'package:hmg_patient_app_new/features/location/location_repo.dart'; import 'package:hmg_patient_app_new/features/location/location_view_model.dart'; import 'package:hmg_patient_app_new/features/medical_file/medical_file_repo.dart'; import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; +import 'package:hmg_patient_app_new/features/monthly_report/monthly_report_repo.dart'; +import 'package:hmg_patient_app_new/features/monthly_report/monthly_report_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_repo.dart'; @@ -141,6 +143,7 @@ class AppDependencies { getIt.registerLazySingleton(() => BloodDonationRepoImp(loggerService: getIt(), apiClient: getIt())); getIt.registerLazySingleton(() => WaterMonitorRepoImp(loggerService: getIt(), apiClient: getIt())); getIt.registerLazySingleton(() => MyInvoicesRepoImp(loggerService: getIt(), apiClient: getIt())); + getIt.registerLazySingleton(() => MonthlyReportRepoImp(loggerService: getIt(), apiClient: getIt())); // ViewModels // Global/shared VMs → LazySingleton @@ -276,5 +279,7 @@ class AppDependencies { getIt.registerLazySingleton(() => WaterMonitorViewModel(waterMonitorRepo: getIt())); getIt.registerLazySingleton(() => MyInvoicesViewModel(myInvoicesRepo: getIt(), errorHandlerService: getIt(), navServices: getIt())); + + getIt.registerLazySingleton(() => MonthlyReportViewModel(errorHandlerService: getIt(), monthlyReportRepo: getIt())); } } diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart index 8d13190..9edc9b2 100644 --- a/lib/core/utils/utils.dart +++ b/lib/core/utils/utils.dart @@ -326,7 +326,7 @@ class Utils { children: [ SizedBox(height: isSmallWidget ? 0.h : 48.h), Lottie.asset(AppAnimations.noData, - repeat: false, reverse: false, frameRate: FrameRate(60), width: width.h, height: height.h, fit: BoxFit.fill), + repeat: false, reverse: false, frameRate: FrameRate(60), width: width.w, height: height.h, fit: BoxFit.fill), SizedBox(height: 16.h), (noDataText ?? LocaleKeys.noDataAvailable.tr()) .toText14(weight: FontWeight.w500, color: AppColors.greyTextColor, isCenter: true) diff --git a/lib/extensions/string_extensions.dart b/lib/extensions/string_extensions.dart index 75c57a7..309dde1 100644 --- a/lib/extensions/string_extensions.dart +++ b/lib/extensions/string_extensions.dart @@ -192,7 +192,8 @@ extension EmailValidator on String { letterSpacing: letterSpacing, height: height, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), - decoration: isUnderLine ? TextDecoration.underline : null), + decoration: isUnderLine ? TextDecoration.underline : null, + decorationColor: color ?? AppColors.blackColor), ); Widget toText15( diff --git a/lib/features/monthly_report/monthly_report_repo.dart b/lib/features/monthly_report/monthly_report_repo.dart new file mode 100644 index 0000000..429700c --- /dev/null +++ b/lib/features/monthly_report/monthly_report_repo.dart @@ -0,0 +1,53 @@ +import 'package:dartz/dartz.dart'; +import 'package:hmg_patient_app_new/core/api/api_client.dart'; +import 'package:hmg_patient_app_new/core/api_consts.dart'; +import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart'; +import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart'; +import 'package:hmg_patient_app_new/services/logger_service.dart'; + +abstract class MonthlyReportRepo { + Future>> updatePatientHealthSummaryReport({required bool rSummaryReport}); +} + +class MonthlyReportRepoImp implements MonthlyReportRepo { + final ApiClient apiClient; + final LoggerService loggerService; + + MonthlyReportRepoImp({required this.loggerService, required this.apiClient}); + + @override + Future>> updatePatientHealthSummaryReport({required bool rSummaryReport}) async { + Map mapDevice = { + "RSummaryReport": rSummaryReport, + }; + + try { + GenericApiModel? apiResponse; + Failure? failure; + await apiClient.post( + UPDATE_HEALTH_TERMS, + body: mapDevice, + onFailure: (error, statusCode, {messageStatus, failureType}) { + failure = failureType; + }, + onSuccess: (response, statusCode, {messageStatus, errorMessage}) { + try { + apiResponse = GenericApiModel( + messageStatus: messageStatus, + statusCode: statusCode, + errorMessage: errorMessage, + data: response, + ); + } catch (e) { + failure = DataParsingFailure(e.toString()); + } + }, + ); + if (failure != null) return Left(failure!); + if (apiResponse == null) return Left(ServerFailure("Unknown error")); + return Right(apiResponse!); + } catch (e) { + return Left(UnknownFailure(e.toString())); + } + } +} diff --git a/lib/features/monthly_report/monthly_report_view_model.dart b/lib/features/monthly_report/monthly_report_view_model.dart new file mode 100644 index 0000000..348ca92 --- /dev/null +++ b/lib/features/monthly_report/monthly_report_view_model.dart @@ -0,0 +1,66 @@ +import 'package:flutter/material.dart'; +import 'package:hmg_patient_app_new/features/monthly_report/monthly_report_repo.dart'; +import 'package:hmg_patient_app_new/services/error_handler_service.dart'; + +class MonthlyReportViewModel extends ChangeNotifier { + MonthlyReportRepo monthlyReportRepo; + ErrorHandlerService errorHandlerService; + + bool isUpdateHealthSummaryLoading = false; + bool isHealthSummaryEnabled = false; + + MonthlyReportViewModel({ + required this.monthlyReportRepo, + required this.errorHandlerService, + }); + + setHealthSummaryEnabled(bool value) { + isHealthSummaryEnabled = value; + notifyListeners(); + } + + Future updatePatientHealthSummaryReport({ + required bool rSummaryReport, + Function(dynamic)? onSuccess, + Function(String)? onError, + }) async { + isUpdateHealthSummaryLoading = true; + notifyListeners(); + + final result = await monthlyReportRepo.updatePatientHealthSummaryReport( + rSummaryReport: rSummaryReport, + ); + + result.fold( + (failure) async { + isUpdateHealthSummaryLoading = false; + notifyListeners(); + await errorHandlerService.handleError(failure: failure); + if (onError != null) { + onError(failure.toString()); + } + }, + (apiResponse) { + isUpdateHealthSummaryLoading = false; + if (apiResponse.messageStatus == 2) { + notifyListeners(); + if (onError != null) { + onError(apiResponse.errorMessage ?? "Unknown error"); + } + } else if (apiResponse.messageStatus == 1) { + // Update the local state on success + isHealthSummaryEnabled = rSummaryReport; + notifyListeners(); + if (onSuccess != null) { + onSuccess(apiResponse); + } + } + }, + ); + } + + @override + void dispose() { + super.dispose(); + } +} diff --git a/lib/main.dart b/lib/main.dart index a9d16dc..eb57c37 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -22,6 +22,7 @@ import 'package:hmg_patient_app_new/features/lab/history/lab_history_viewmodel.d import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart'; import 'package:hmg_patient_app_new/features/location/location_view_model.dart'; import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; +import 'package:hmg_patient_app_new/features/monthly_report/monthly_report_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; @@ -173,6 +174,9 @@ void main() async { ), ChangeNotifierProvider( create: (_) => getIt.get(), + ), + ChangeNotifierProvider( + create: (_) => getIt.get(), ) ], child: MyApp()), ), diff --git a/lib/presentation/book_appointment/select_livecare_clinic_page.dart b/lib/presentation/book_appointment/select_livecare_clinic_page.dart index 2362617..502e38d 100644 --- a/lib/presentation/book_appointment/select_livecare_clinic_page.dart +++ b/lib/presentation/book_appointment/select_livecare_clinic_page.dart @@ -48,7 +48,7 @@ class SelectLivecareClinicPage extends StatelessWidget { SizedBox(height: 40.h), Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.immediate_service_icon, width: 58.h, height: 58.h), + Utils.buildSvgWithAssets(icon: AppAssets.immediate_service_icon, width: 58.w, height: 58.h), SizedBox(width: 18.h), Expanded( child: Column( diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index f705993..6dde958 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -3,9 +3,11 @@ import 'dart:async'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; +import 'package:get_it/get_it.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/core/app_state.dart'; +import 'package:hmg_patient_app_new/core/cache_consts.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/core/utils/size_config.dart'; @@ -23,6 +25,7 @@ import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart'; import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; import 'package:hmg_patient_app_new/features/medical_file/models/family_file_response_model.dart'; import 'package:hmg_patient_app_new/features/medical_file/models/patient_sickleave_response_model.dart'; +import 'package:hmg_patient_app_new/features/monthly_report/monthly_report_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_view_model.dart'; @@ -49,12 +52,14 @@ import 'package:hmg_patient_app_new/presentation/medical_file/widgets/lab_rad_ca import 'package:hmg_patient_app_new/presentation/medical_file/widgets/medical_file_card.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/widgets/patient_sick_leave_card.dart'; import 'package:hmg_patient_app_new/presentation/medical_report/medical_reports_page.dart'; +import 'package:hmg_patient_app_new/presentation/monthly_report/monthly_report.dart'; import 'package:hmg_patient_app_new/presentation/my_family/my_family.dart'; import 'package:hmg_patient_app_new/presentation/my_invoices/my_invoices_list.dart'; import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_list_page.dart'; import 'package:hmg_patient_app_new/presentation/radiology/radiology_orders_page.dart'; import 'package:hmg_patient_app_new/presentation/todo_section/todo_page.dart'; import 'package:hmg_patient_app_new/presentation/vital_sign/vital_sign_page.dart'; +import 'package:hmg_patient_app_new/services/cache_service.dart'; import 'package:hmg_patient_app_new/services/dialog_service.dart'; import 'package:hmg_patient_app_new/services/navigation_service.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; @@ -89,6 +94,9 @@ class _MedicalFilePageState extends State { late MyInvoicesViewModel myInvoicesViewModel; late HmgServicesViewModel hmgServicesViewModel; late PrescriptionsViewModel prescriptionsViewModel; + late MonthlyReportViewModel monthlyReportViewModel; + + final CacheService cacheService = GetIt.instance(); int currentIndex = 0; @@ -140,6 +148,7 @@ class _MedicalFilePageState extends State { myInvoicesViewModel = Provider.of(context, listen: false); hmgServicesViewModel = Provider.of(context, listen: false); prescriptionsViewModel = Provider.of(context, listen: false); + monthlyReportViewModel = Provider.of(context, listen: false); NavigationService navigationService = getIt.get(); return CollapsingListView( // title: "Medical File".needTranslation, @@ -1217,7 +1226,14 @@ class _MedicalFilePageState extends State { svgIcon: AppAssets.monthly_reports_icon, isLargeText: true, iconSize: 36.h, - ), + ).onPress(() { + monthlyReportViewModel.setHealthSummaryEnabled(cacheService.getBool(key: CacheConst.isMonthlyReportEnabled) ?? false); + Navigator.of(context).push( + CustomPageRoute( + page: MonthlyReport(), + ), + ); + }), MedicalFileCard( label: "Medical Reports".needTranslation, textColor: AppColors.blackColor, diff --git a/lib/presentation/monthly_report/monthly_report.dart b/lib/presentation/monthly_report/monthly_report.dart new file mode 100644 index 0000000..1776510 --- /dev/null +++ b/lib/presentation/monthly_report/monthly_report.dart @@ -0,0 +1,189 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:get_it/get_it.dart'; +import 'package:hmg_patient_app_new/core/app_assets.dart'; +import 'package:hmg_patient_app_new/core/app_state.dart'; +import 'package:hmg_patient_app_new/core/cache_consts.dart'; +import 'package:hmg_patient_app_new/core/dependencies.dart'; +import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; +import 'package:hmg_patient_app_new/core/utils/utils.dart'; +import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; +import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; +import 'package:hmg_patient_app_new/features/monthly_report/monthly_report_view_model.dart'; +import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; +import 'package:hmg_patient_app_new/services/cache_service.dart'; +import 'package:hmg_patient_app_new/theme/colors.dart'; +import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; +import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; +import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; +import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart'; +import 'package:provider/provider.dart'; + +class MonthlyReport extends StatelessWidget { + MonthlyReport({super.key}); + + late AppState appState; + final CacheService _cacheService = GetIt.instance(); + bool isTermsAccepted = true; + + @override + Widget build(BuildContext context) { + appState = getIt.get(); + return Scaffold( + backgroundColor: AppColors.bgScaffoldColor, + body: Consumer(builder: (context, monthlyReportVM, child) { + return Column( + children: [ + Expanded( + child: CollapsingListView( + title: LocaleKeys.monthlyReports.tr(), + child: SingleChildScrollView( + child: Column( + children: [ + SizedBox(height: 24.h), + Container( + decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + color: AppColors.whiteColor, + borderRadius: 20.r, + hasShadow: false, + ), + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + LocaleKeys.patientHealthSummaryReport.tr(context: context).toText14(isBold: true), + const Spacer(), + Switch( + activeTrackColor: AppColors.successColor, + value: monthlyReportVM.isHealthSummaryEnabled, + onChanged: (newValue) async { + monthlyReportVM.setHealthSummaryEnabled(newValue); + }, + ), + ], + ).paddingSymmetrical(16.h, 16.h), + ), + SizedBox(height: 16.h), + Container( + decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + color: AppColors.whiteColor, + borderRadius: 20.r, + hasShadow: false, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Utils.buildSvgWithAssets(icon: AppAssets.email_icon, width: 40.h, height: 40.h), + SizedBox(width: 8.h), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + LocaleKeys.email.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), + "${appState.getAuthenticatedUser()!.emailAddress}".toText16(color: AppColors.textColor, weight: FontWeight.w500), + ], + ), + ], + ), + ], + ).paddingSymmetrical(16.h, 16.h), + ), + SizedBox(height: 16.h), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Utils.buildSvgWithAssets(icon: AppAssets.prescription_remarks_icon, width: 18.w, height: 18.h), + SizedBox(width: 9.h), + Expanded( + child: + "This monthly health summary report reflects the health indicators and analysis results of the latest visits. Please note that this will be sent automatically from the system and it’s not considered as a official report so no medical decision should be taken based on it" + .needTranslation + .toText10(weight: FontWeight.w500, color: AppColors.greyTextColorLight), + ), + ], + ), + ], + ).paddingSymmetrical(24.w, 0.h), + ), + ), + ), + Container( + decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + color: AppColors.whiteColor, + borderRadius: 24.r, + hasShadow: true, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(top: 32.h, left: 24.w), + child: Row( + children: [ + SizedBox( + height: 24.0, + width: 24.0, + child: Checkbox( + value: isTermsAccepted, + onChanged: (v) { + isTermsAccepted = v ?? true; + }, + activeColor: AppColors.primaryRedColor, + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + visualDensity: VisualDensity.compact, + ), + ), + SizedBox(width: 10.w), + "I agree to the ".toText14(isBold: true, letterSpacing: -1.0), + "terms and conditions".toText14(isBold: true, letterSpacing: -1.0, color: AppColors.primaryRedColor, isUnderLine: true).onPress(() { + Utils.openWebView( + url: 'https://hmg.com/en/Pages/Terms.aspx', + ); + }) + ], + ), + ), + CustomButton( + text: LocaleKeys.save.tr(), + onPressed: () async { + LoaderBottomSheet.showLoader(loadingText: "Updating Monthly Report Status...".needTranslation); + await monthlyReportVM.updatePatientHealthSummaryReport( + rSummaryReport: monthlyReportVM.isHealthSummaryEnabled, + onSuccess: (response) async { + LoaderBottomSheet.hideLoader(); + await _cacheService.saveBool( + key: CacheConst.isMonthlyReportEnabled, + value: monthlyReportVM.isHealthSummaryEnabled, + ); + showCommonBottomSheetWithoutHeight( + context, + child: Utils.getSuccessWidget(loadingText: "Monthly Report Status Updated Successfully".needTranslation), + callBackFunc: () {}, + isFullScreen: false, + isCloseButtonVisible: true, + ); + }, + onError: (error) { + // Error is already handled by errorHandlerService in view model + }, + ); + }, + backgroundColor: AppColors.primaryRedColor, + borderColor: AppColors.primaryRedColor, + textColor: AppColors.whiteColor, + fontSize: 16.f, + fontWeight: FontWeight.w500, + borderRadius: 12.r, + height: 46.h, + iconColor: AppColors.whiteColor, + iconSize: 20.h, + ).paddingSymmetrical(24.h, 24.h), + ], + ), + ), + ], + ); + }), + ); + } +} diff --git a/lib/presentation/profile_settings/profile_settings.dart b/lib/presentation/profile_settings/profile_settings.dart index 9e4c808..e463ae7 100644 --- a/lib/presentation/profile_settings/profile_settings.dart +++ b/lib/presentation/profile_settings/profile_settings.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_swiper_view/flutter_swiper_view.dart'; @@ -28,6 +30,7 @@ import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; class ProfileSettings extends StatefulWidget { const ProfileSettings({super.key}); @@ -195,8 +198,6 @@ class ProfileSettingsState extends State { title: "Application Language".needTranslation, child: AppLanguageChange(), callBackFunc: () {}, isFullScreen: false); }, trailingLabel: Utils.appState.isArabic() ? "العربية".needTranslation : "English".needTranslation), 1.divider, - actionItem(AppAssets.accessibility, "Symptoms Checker".needTranslation, () {}), - 1.divider, actionItem(AppAssets.accessibility, "Accessibility".needTranslation, () {}), 1.divider, actionItem(AppAssets.bell, "Notifications Settings".needTranslation, () {}), @@ -235,15 +236,35 @@ class ProfileSettingsState extends State { decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true), child: Column( children: [ - actionItem(AppAssets.call_fill, "Contact Us".needTranslation, () {}, trailingLabel: "9200666666"), + actionItem(AppAssets.call_fill, "Contact Us".needTranslation, () { + launchUrl(Uri.parse("tel://" + "+966 11 525 9999")); + }, trailingLabel: "011 525 9999"), 1.divider, actionItem(AppAssets.permission, "Permissions".needTranslation, () {}, trailingLabel: "Location, Camera"), 1.divider, - actionItem(AppAssets.rate, "Rate Our App".needTranslation, () {}, isExternalLink: true), + actionItem(AppAssets.rate, "Rate Our App".needTranslation, () { + if (Platform.isAndroid) { + Utils.openWebView( + url: 'https://play.google.com/store/apps/details?id=com.ejada.hmg', + ); + } else { + Utils.openWebView( + url: 'https://itunes.apple.com/app/id733503978', + ); + } + }, isExternalLink: true), 1.divider, - actionItem(AppAssets.privacy_terms, "Privacy Policy".needTranslation, () {}, isExternalLink: true), + actionItem(AppAssets.privacy_terms, "Privacy Policy".needTranslation, () { + Utils.openWebView( + url: 'https://hmg.com/en/Pages/Privacy.aspx', + ); + }, isExternalLink: true), 1.divider, - actionItem(AppAssets.privacy_terms, "Terms & Conditions".needTranslation, () {}, isExternalLink: true), + actionItem(AppAssets.privacy_terms, "Terms & Conditions".needTranslation, () { + Utils.openWebView( + url: 'https://hmg.com/en/Pages/Terms.aspx', + ); + }, isExternalLink: true), ], ), ), diff --git a/lib/widgets/appbar/collapsing_list_view.dart b/lib/widgets/appbar/collapsing_list_view.dart index aa6cc3e..5409fcf 100644 --- a/lib/widgets/appbar/collapsing_list_view.dart +++ b/lib/widgets/appbar/collapsing_list_view.dart @@ -89,7 +89,7 @@ class CollapsingListView extends StatelessWidget { ? Transform.flip( flipX: appState.isArabic(), child: IconButton( - icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.closeBottomNav : AppAssets.arrow_back, width: 32.h, height: 32.h), + icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.closeBottomNav : AppAssets.arrow_back, width: 24.h, height: 24.h), padding: EdgeInsets.only(left: 12), onPressed: () { if (leadingCallback != null) { @@ -265,6 +265,7 @@ class _ScrollAnimatedTitleState extends State { style: TextStyle( fontSize: _fontSize, fontWeight: FontWeight.bold, + letterSpacing: -1.0, ), ).expanded, ...[