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 1db8810..02160a2 100644 --- a/lib/core/app_assets.dart +++ b/lib/core/app_assets.dart @@ -98,6 +98,7 @@ class AppAssets { static const String email_icon = '$svgBasePath/email_icon.svg'; static const String notes_icon = '$svgBasePath/notes_icon.svg'; static const String forward_chevron_icon = '$svgBasePath/forward_chevron_icon.svg'; + static const String logout = '$svgBasePath/logout.svg'; //bottom navigation// static const String homeBottom = '$svgBasePath/home_bottom.svg'; diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart index 515c2d1..e46d7ff 100644 --- a/lib/features/authentication/authentication_view_model.dart +++ b/lib/features/authentication/authentication_view_model.dart @@ -80,7 +80,7 @@ class AuthenticationViewModel extends ChangeNotifier { String errorMsg = ''; final FocusNode myFocusNode = FocusNode(); var healthId; - int getDeviceLastLogin = 1; + int getDeviceLastLogin =1; Future onLoginPressed() async { try { @@ -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()); } @@ -292,11 +293,12 @@ class AuthenticationViewModel extends ChangeNotifier { } else if (apiResponse.messageStatus == 1) { if (apiResponse.data['isSMSSent']) { _appState.setAppAuthToken = apiResponse.data['LogInTokenID']; - await sendActivationCode( + await sendActivationCode( otpTypeEnum: otpTypeEnum, phoneNumber: phoneNumberController.text, nationalIdOrFileNumber: nationalIdController.text, ); + } else { if (apiResponse.data['IsAuthenticated']) { await checkActivationCode( @@ -304,6 +306,7 @@ class AuthenticationViewModel extends ChangeNotifier { onWrongActivationCode: (String? message) {}, activationCode: null, //todo silent login case halded on the repo itself.. ); + } } } @@ -450,7 +453,6 @@ class AuthenticationViewModel extends ChangeNotifier { if (_appState.getSelectDeviceByImeiRespModelElement != null) { _appState.getSelectDeviceByImeiRespModelElement!.logInType = loginTypeEnum.toInt; } - LoaderBottomSheet.hideLoader(); insertPatientIMEIData(loginTypeEnum.toInt); clearDefaultInputValues(); @@ -736,6 +738,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/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, ), ); }