From f9859036ef9ce18f9f495189bc70e000548f30fd Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Wed, 10 Sep 2025 16:08:31 +0300 Subject: [PATCH 1/2] ui improvements. --- assets/images/svg/logout.svg | 4 ++++ lib/core/app_assets.dart | 1 + lib/presentation/lab/collapsing_list_view.dart | 9 ++++++--- lib/presentation/lab/search_lab_report.dart | 4 ---- lib/theme/app_theme.dart | 1 + 5 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 assets/images/svg/logout.svg diff --git a/assets/images/svg/logout.svg b/assets/images/svg/logout.svg new file mode 100644 index 0000000..b52e142 --- /dev/null +++ b/assets/images/svg/logout.svg @@ -0,0 +1,4 @@ + + + + diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart index a2cbc49..d0acea0 100644 --- a/lib/core/app_assets.dart +++ b/lib/core/app_assets.dart @@ -93,6 +93,7 @@ class AppAssets { static const String checkin_location_icon = '$svgBasePath/checkin_location_icon.svg'; static const String checkin_nfc_icon = '$svgBasePath/checkin_nfc_icon.svg'; static const String checkin_qr_icon = '$svgBasePath/checkin_qr_icon.svg'; + static const String logout = '$svgBasePath/logout.svg'; //bottom navigation// static const String homeBottom = '$svgBasePath/home_bottom.svg'; diff --git a/lib/presentation/lab/collapsing_list_view.dart b/lib/presentation/lab/collapsing_list_view.dart index c95a400..c7f1540 100644 --- a/lib/presentation/lab/collapsing_list_view.dart +++ b/lib/presentation/lab/collapsing_list_view.dart @@ -2,6 +2,7 @@ import 'dart:ui'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.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/utils/utils.dart'; @@ -17,10 +18,11 @@ class CollapsingListView extends StatelessWidget { VoidCallback? search; VoidCallback? report; VoidCallback? logout; + VoidCallback? history; Widget? bottomChild; bool isClose; - CollapsingListView({required this.title, this.child, this.search, this.isClose = false, this.bottomChild, this.report, this.logout}); + CollapsingListView({required this.title, this.child, this.search, this.isClose = false, this.bottomChild, this.report, this.logout, this.history}); @override Widget build(BuildContext context) { @@ -34,6 +36,7 @@ class CollapsingListView extends StatelessWidget { pinned: true, expandedHeight: 100, stretch: true, + systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light), surfaceTintColor: Colors.transparent, backgroundColor: AppColors.bgScaffoldColor, leading: IconButton( @@ -49,7 +52,6 @@ class CollapsingListView extends StatelessWidget { t = t - 1; if (t < 0.7) t = 0.7; t = t.clamp(0.0, 1.0); - print("t:$t"); final double fontSize = lerpDouble(14, 18, t)!; final double bottomPadding = lerpDouble(0, 0, t)!; @@ -81,8 +83,9 @@ class CollapsingListView extends StatelessWidget { color: AppColors.blackColor, letterSpacing: -0.5), ).expanded, - if (logout != null) actionButton(context, t, title: "Logout".needTranslation, icon: AppAssets.report_icon).onPress(logout!), + if (logout != null) actionButton(context, t, title: "Logout".needTranslation, icon: AppAssets.logout).onPress(logout!), if (report != null) actionButton(context, t, title: "Report".needTranslation, icon: AppAssets.report_icon).onPress(report!), + if (history != null) actionButton(context, t, title: "History".needTranslation, icon: AppAssets.insurance_history_icon).onPress(history!), if (search != null) Utils.buildSvgWithAssets(icon: AppAssets.search_icon).onPress(search!).paddingOnly(right: 24) ], )), diff --git a/lib/presentation/lab/search_lab_report.dart b/lib/presentation/lab/search_lab_report.dart index 25f58fc..1b47a55 100644 --- a/lib/presentation/lab/search_lab_report.dart +++ b/lib/presentation/lab/search_lab_report.dart @@ -143,10 +143,6 @@ class SuggestionChip extends StatelessWidget { decoration: BoxDecoration( color: isSelected ? AppColors.primaryRedColor : AppColors.whiteColor, borderRadius: BorderRadius.circular(8), - border: Border.all( - color: AppColors.greyColor, - width: 1, - ), ), child: label.toText12( color: isSelected ? Colors.white : Colors.black87, diff --git a/lib/theme/app_theme.dart b/lib/theme/app_theme.dart index 45d2ddf..ed103e5 100644 --- a/lib/theme/app_theme.dart +++ b/lib/theme/app_theme.dart @@ -47,6 +47,7 @@ class AppTheme { color: Colors.grey[800], ), systemOverlayStyle: SystemUiOverlayStyle.light, + surfaceTintColor: Colors.transparent, ), ); } From a5f64798e0a7b3578e52f00ba58d8e6760dce32f Mon Sep 17 00:00:00 2001 From: Sultan khan Date: Wed, 10 Sep 2025 16:34:28 +0300 Subject: [PATCH 2/2] login fixes --- .../authentication/authentication_view_model.dart | 9 ++++++--- lib/presentation/lab/lab_orders_page.dart | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart index c82037f..505391d 100644 --- a/lib/features/authentication/authentication_view_model.dart +++ b/lib/features/authentication/authentication_view_model.dart @@ -191,7 +191,7 @@ class AuthenticationViewModel extends ChangeNotifier { (failure) async { // LoadingUtils.hideFullScreenLoader(); // await _errorHandlerService.handleError(failure: failure); - LoadingUtils.hideFullScreenLoader(); + LoaderBottomSheet.hideLoader(); _navigationService.pushPage(page: LoginScreen()); }, (apiResponse) { @@ -238,6 +238,7 @@ class AuthenticationViewModel extends ChangeNotifier { _navigationService.pushPage(page: SavedLogin()); // _navigationService.pushPage(page: LoginScreen()); } else { + print("print login........"); LoaderBottomSheet.hideLoader(); _navigationService.pushPage(page: LoginScreen()); } @@ -451,8 +452,9 @@ class AuthenticationViewModel extends ChangeNotifier { bool isUserAgreedBefore = await checkIfUserAgreedBefore(request: request); //updating the last login type in app state to show the fingerprint/face id option on home screen - _appState.getSelectDeviceByImeiRespModelElement!.logInType = loginTypeEnum.toInt; - + if( _appState.getSelectDeviceByImeiRespModelElement !=null) { + _appState.getSelectDeviceByImeiRespModelElement!.logInType = loginTypeEnum.toInt; + } LoaderBottomSheet.hideLoader(); insertPatientIMEIData(loginTypeEnum.toInt); clearDefaultInputValues(); @@ -738,6 +740,7 @@ class AuthenticationViewModel extends ChangeNotifier { deviceTypeId: _appState.getDeviceTypeID(), patientId: _appState.getAuthenticatedUser()!.patientId!, patientIdentificationNo: _appState.getAuthenticatedUser()!.patientIdentificationNo!, + identificationNo: _appState.getAuthenticatedUser()!.patientIdentificationNo!, firstName: _appState.getAuthenticatedUser()!.firstName!, lastName: _appState.getAuthenticatedUser()!.lastName!, patientTypeId: _appState.getAuthenticatedUser()!.patientType, diff --git a/lib/presentation/lab/lab_orders_page.dart b/lib/presentation/lab/lab_orders_page.dart index cf90fd8..0391f6a 100644 --- a/lib/presentation/lab/lab_orders_page.dart +++ b/lib/presentation/lab/lab_orders_page.dart @@ -14,7 +14,6 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/features/lab/models/resp_models/patient_lab_orders_response_model.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart'; -import 'package:hmg_patient_app_new/presentation/lab/collapse_example.dart'; import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart'; import 'package:hmg_patient_app_new/presentation/lab/search_lab_report.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';