|
|
|
|
@ -1,11 +1,14 @@
|
|
|
|
|
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_state.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/dependencies.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/enums.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/utils/doctor_response_mapper.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/authentication/authentication_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_repo.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/blood_donation/models/blood_group_hospitals_model.dart';
|
|
|
|
|
@ -20,6 +23,7 @@ import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/services/dialog_service.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/services/error_handler_service.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/services/navigation_service.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
|
|
|
|
|
|
|
|
|
|
class BloodDonationViewModel extends ChangeNotifier {
|
|
|
|
|
@ -263,7 +267,13 @@ class BloodDonationViewModel extends ChangeNotifier {
|
|
|
|
|
await bloodDonationRepo.updateBloodGroup(request: payload);
|
|
|
|
|
await addUserAgreementForBloodDonation();
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
dialogService.showSuccessBottomSheetWithoutH(message: "Blood Group Updated Successfully", onOkPressed: () {});
|
|
|
|
|
showCommonBottomSheetWithoutHeight(GetIt.instance<NavigationService>().navigatorKey.currentContext!,
|
|
|
|
|
child: Utils.getSuccessWidget(loadingText: "Blood Group Updated Successfully").paddingSymmetrical(0.h, 24.h),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: false,
|
|
|
|
|
isAutoDismiss: true);
|
|
|
|
|
// dialogService.showSuccessBottomSheetWithoutH(message: "Blood Group Updated Successfully", onOkPressed: () {});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> addUserAgreementForBloodDonation() async {
|
|
|
|
|
|