diff --git a/lib/config/config.dart b/lib/config/config.dart index 2815b5dc..519b3942 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -7,9 +7,9 @@ const ONLY_DATE = "[0-9/]"; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/'; // const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://webservices.hmg.com/'; @@ -281,6 +281,10 @@ const DOCTOR_ER_SIGN_ASSESSMENT = "Services/DoctorApplication.svc/REST/DoctorApp const DOCTOR_SCHEDULE = "api/ScheduledSchedule/GetallSchedulebyUser"; +const DOCTOR_RADIOLOGY_CRITICAL_FINDINGS = "Services/DoctorApplication.svc/REST/FetchRadCriticalFinding"; + +const ACKNOWLEDGE_RADIOLOGY_CRITICAL_FINDINGS = "Services/DoctorApplication.svc/REST/Acknowledgeradcriticalfindings"; + var selectedPatientType = 1; //*********change value to decode json from Dropdown ************ diff --git a/lib/core/model/dashboard/radiology_critical_finding_model.dart b/lib/core/model/dashboard/radiology_critical_finding_model.dart new file mode 100644 index 00000000..3940cb51 --- /dev/null +++ b/lib/core/model/dashboard/radiology_critical_finding_model.dart @@ -0,0 +1,60 @@ +class RadiologyCriticalFindingModel { + String clinicName; + String doctorName; + String imageURL; + int invoiceLineItemNo; + int invoiceNo; + String notificationMesssage; + int patientId; + String patientName; + String procedureName; + String reportData; + String reportOn; + String resultFindings; + + RadiologyCriticalFindingModel( + {this.clinicName, + this.doctorName, + this.imageURL, + this.invoiceLineItemNo, + this.invoiceNo, + this.notificationMesssage, + this.patientId, + this.patientName, + this.procedureName, + this.reportData, + this.reportOn, + this.resultFindings}); + + RadiologyCriticalFindingModel.fromJson(Map json) { + clinicName = json['clinicName']; + doctorName = json['doctorName']; + imageURL = json['imageURL']; + invoiceLineItemNo = json['invoiceLineItemNo']; + invoiceNo = json['invoiceNo']; + notificationMesssage = json['notificationMesssage']; + patientId = json['patientId']; + patientName = json['patientName']; + procedureName = json['procedureName']; + reportData = json['reportData']; + reportOn = json['reportOn']; + resultFindings = json['resultFindings']; + } + + Map toJson() { + final Map data = new Map(); + data['clinicName'] = this.clinicName; + data['doctorName'] = this.doctorName; + data['imageURL'] = this.imageURL; + data['invoiceLineItemNo'] = this.invoiceLineItemNo; + data['invoiceNo'] = this.invoiceNo; + data['notificationMesssage'] = this.notificationMesssage; + data['patientId'] = this.patientId; + data['patientName'] = this.patientName; + data['procedureName'] = this.procedureName; + data['reportData'] = this.reportData; + data['reportOn'] = this.reportOn; + data['resultFindings'] = this.resultFindings; + return data; + } +} diff --git a/lib/core/service/home/dasboard_service.dart b/lib/core/service/home/dasboard_service.dart index fe664baa..e67bbec4 100644 --- a/lib/core/service/home/dasboard_service.dart +++ b/lib/core/service/home/dasboard_service.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/radiology_critical_finding_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart'; @@ -7,8 +8,12 @@ import '../../model/dashboard/doctor_schedule.dart'; class DashboardService extends BaseService { List _dashboardItemsList = []; + RadiologyCriticalFindingModel _radiologyCriticalFindingModel; + List get dashboardItemsList => _dashboardItemsList; - + + RadiologyCriticalFindingModel get radiologyCriticalFindingModel => _radiologyCriticalFindingModel; + bool hasVirtualClinic = false; String sServiceID; @@ -48,4 +53,46 @@ class DashboardService extends BaseService { }, ); } + + Future acknowledgeDoctorHasRadiologyFindings(String invoiceNo, String invoiceLineItemNo) async { + hasError = false; + await getDoctorProfile(isGetProfile: true); + await baseAppClient.post( + ACKNOWLEDGE_RADIOLOGY_CRITICAL_FINDINGS, + onSuccess: (dynamic response, int statusCode) { + // _radiologyCriticalFindingModel = RadiologyCriticalFindingModel.fromJson(response["RadiologyVMEntityListInfoResponse"]["entityList"][0]); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: { + "DoctorID": doctorProfile?.doctorID, // test user 9920 + "LoginDoctorID": doctorProfile?.doctorID, + "invoiceNo": invoiceNo, + "invoiceLineItemNo": invoiceLineItemNo, + }, + ); + } + + Future checkDoctorHasRadiologyFindings() async { + hasError = false; + await getDoctorProfile(isGetProfile: true); + await baseAppClient.post( + DOCTOR_RADIOLOGY_CRITICAL_FINDINGS, + onSuccess: (dynamic response, int statusCode) { + if(response["RadiologyVMEntityListInfoResponse"]["entityList"].length != 0) { + _radiologyCriticalFindingModel = RadiologyCriticalFindingModel.fromJson(response["RadiologyVMEntityListInfoResponse"]["entityList"][0]); + } + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: { + "DoctorID": doctorProfile?.doctorID, // test user 9920 + "LoginDoctorID": doctorProfile?.doctorID + }, + ); + } } diff --git a/lib/core/viewModel/authentication_view_model.dart b/lib/core/viewModel/authentication_view_model.dart index aec315c8..f1e65762 100644 --- a/lib/core/viewModel/authentication_view_model.dart +++ b/lib/core/viewModel/authentication_view_model.dart @@ -328,13 +328,19 @@ class AuthenticationViewModel extends BaseViewModel { getDeviceInfoFromFirebase() async { // await checkIsHuawei(); var token; + var APNSToken; _firebaseMessaging.setAutoInitEnabled(true); if (Platform.isIOS) { _firebaseMessaging.requestPermission(); } setState(ViewState.Busy); try { + if (Platform.isIOS) { + APNSToken = await _firebaseMessaging.getAPNSToken(); + print("APNS TOKEN: $APNSToken"); + } token = await _firebaseMessaging.getToken(); + print("Device TOKEN: $token"); } catch (ex) { print(ex); } diff --git a/lib/core/viewModel/dashboard_view_model.dart b/lib/core/viewModel/dashboard_view_model.dart index 76e4efcd..e88e5062 100644 --- a/lib/core/viewModel/dashboard_view_model.dart +++ b/lib/core/viewModel/dashboard_view_model.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/model/dashboard/doctor_schedule.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/radiology_critical_finding_model.dart'; import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart'; import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart'; import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart'; @@ -16,12 +17,12 @@ import 'base_view_model.dart'; class DashboardViewModel extends BaseViewModel { final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance; DashboardService _dashboardService = locator(); - SpecialClinicsService _specialClinicsService = - locator(); + SpecialClinicsService _specialClinicsService = locator(); DoctorReplyService _doctorReplyService = locator(); - List get dashboardItemsList => - _dashboardService.dashboardItemsList; + List get dashboardItemsList => _dashboardService.dashboardItemsList; + + RadiologyCriticalFindingModel get radiologyCriticalFindingModel => _dashboardService.radiologyCriticalFindingModel; bool get hasVirtualClinic => _dashboardService.hasVirtualClinic; @@ -29,10 +30,9 @@ class DashboardViewModel extends BaseViewModel { int get notRepliedCount => _doctorReplyService.notRepliedCount; - List get specialClinicalCareList => - _specialClinicsService.specialClinicalCareList; - Future startHomeScreenServices(ProjectViewModel projectsProvider, - AuthenticationViewModel authProvider) async { + List get specialClinicalCareList => _specialClinicsService.specialClinicalCareList; + + Future startHomeScreenServices(ProjectViewModel projectsProvider, AuthenticationViewModel authProvider) async { setState(ViewState.Busy); await getDoctorProfile(isGetProfile: true); @@ -41,6 +41,7 @@ class DashboardViewModel extends BaseViewModel { _dashboardService.getDashboard(), _dashboardService.checkDoctorHasLiveCare(), _specialClinicsService.getSpecialClinicalCareList(), + _dashboardService.checkDoctorHasRadiologyFindings() ]); if (_dashboardService.hasError) { @@ -53,14 +54,13 @@ class DashboardViewModel extends BaseViewModel { } Future setFirebaseNotification(AuthenticationViewModel authProvider) async { - _firebaseMessaging.requestPermission( - sound: true, badge: true, alert: true, provisional: true); + _firebaseMessaging.requestPermission(sound: true, badge: true, alert: true, provisional: true); _firebaseMessaging.getToken().then((String token) async { if (token != '') { // DEVICE_TOKEN = token; ///TODO Elham* return it back - authProvider.insertDeviceImei(token); + authProvider.insertDeviceImei(token); } }); } @@ -75,6 +75,10 @@ class DashboardViewModel extends BaseViewModel { await _dashboardService.checkDoctorHasLiveCare(); } + Future acknowledgeRadiologyCriticalFinding(String invoiceNo, String invoiceLineItemNo) async { + await _dashboardService.acknowledgeDoctorHasRadiologyFindings(invoiceNo, invoiceLineItemNo); + } + Future getSpecialClinicalCareList() async { setState(ViewState.Busy); await _specialClinicsService.getSpecialClinicalCareList(); @@ -85,8 +89,7 @@ class DashboardViewModel extends BaseViewModel { // setState(ViewState.Idle); } - Future changeClinic( - int clinicId, AuthenticationViewModel authProvider) async { + Future changeClinic(int clinicId, AuthenticationViewModel authProvider) async { setState(ViewState.BusyLocal); await getDoctorProfile(); ClinicModel clinicModel = ClinicModel( @@ -130,6 +133,4 @@ class DashboardViewModel extends BaseViewModel { setState(ViewState.Idle); } } - - } diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index b361d1fe..631b5f8d 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -71,8 +71,14 @@ class _HomeScreenState extends State { return BaseView( onModelReady: (model) async { - model.startHomeScreenServices( - projectsProvider, authenticationViewModel); + model.startHomeScreenServices(projectsProvider, authenticationViewModel).then((value) { + if (model.radiologyCriticalFindingModel != null) { + print("onModelReady radiologyCriticalFindingModel!!!"); + showRadiologyFindingDialog(model); + } else { + print("onModelReady radiologyCriticalFindingModel EMPTYYYY!!!"); + } + }); }, builder: (_, model, w) => AppScaffold( baseViewModel: model, @@ -87,12 +93,9 @@ class _HomeScreenState extends State { //TODO Elham* make it componet Container( width: 40, - margin: EdgeInsets.only( - left: projectsProvider.isArabic ? 0 : 32, - right: projectsProvider.isArabic ? 23 : 0), + margin: EdgeInsets.only(left: projectsProvider.isArabic ? 0 : 32, right: projectsProvider.isArabic ? 23 : 0), child: IconButton( - icon: SvgPicture.asset('assets/images/svgs/menu.svg', - height: 25, width: 10), + icon: SvgPicture.asset('assets/images/svgs/menu.svg', height: 25, width: 10), iconSize: 15, color: Colors.black, onPressed: () => Scaffold.of(context).openDrawer(), @@ -105,118 +108,69 @@ class _HomeScreenState extends State { children: [ Container( width: MediaQuery.of(context).size.width * .6, - child: projectsProvider.doctorClinicsList.length > - 0 + child: projectsProvider.doctorClinicsList.length > 0 ? Stack( children: [ DropdownButtonHideUnderline( child: DropdownButton( dropdownColor: Colors.white, - iconEnabledColor: - AppGlobal.appTextColor, + iconEnabledColor: AppGlobal.appTextColor, icon: Icon(Icons.keyboard_arrow_down), isExpanded: true, - value: clinicId == null - ? projectsProvider - .doctorClinicsList[0].clinicID - : clinicId, + value: clinicId == null ? projectsProvider.doctorClinicsList[0].clinicID : clinicId, iconSize: 25, elevation: 16, - selectedItemBuilder: - (BuildContext context) { - return projectsProvider - .doctorClinicsList - .map((item) { + selectedItemBuilder: (BuildContext context) { + return projectsProvider.doctorClinicsList.map((item) { return Row( mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.end, children: [ Column( - mainAxisAlignment: - MainAxisAlignment - .center, + mainAxisAlignment: MainAxisAlignment.center, children: [ Container( - padding: - EdgeInsets.all(0), - margin: - EdgeInsets.all(2), - decoration: - new BoxDecoration( - color: AppGlobal - .appRedColor, - borderRadius: - BorderRadius - .circular( - 20), + padding: EdgeInsets.all(0), + margin: EdgeInsets.all(2), + decoration: new BoxDecoration( + color: AppGlobal.appRedColor, + borderRadius: BorderRadius.circular(20), ), - constraints: - BoxConstraints( + constraints: BoxConstraints( minWidth: 20, minHeight: 20, ), child: Center( child: AppText( - projectsProvider - .doctorClinicsList - .length - .toString(), - color: - Colors.white, - letterSpacing: - -0.72, - fontWeight: - FontWeight - .w600, - fontSize: - projectsProvider - .isArabic - ? 10 - : 12, - textAlign: - TextAlign - .center, + projectsProvider.doctorClinicsList.length.toString(), + color: Colors.white, + letterSpacing: -0.72, + fontWeight: FontWeight.w600, + fontSize: projectsProvider.isArabic ? 10 : 12, + textAlign: TextAlign.center, ), )), ], ), - AppText( - Utils - .convertToTitleCase( - item.clinicName), - fontSize: 14, - letterSpacing: -0.96, - color: AppGlobal - .appTextColor, - fontWeight: - FontWeight.bold, - textAlign: TextAlign.end), + AppText(Utils.convertToTitleCase(item.clinicName), + fontSize: 14, letterSpacing: -0.96, color: AppGlobal.appTextColor, fontWeight: FontWeight.bold, textAlign: TextAlign.end), ], ); }).toList(); }, onChanged: (newValue) async { clinicId = newValue; - GifLoaderDialogUtils.showMyDialog( - context); - await model.changeClinic(newValue, - authenticationViewModel); - GifLoaderDialogUtils.hideDialog( - context); - if (model.state == - ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast( - model.error); + GifLoaderDialogUtils.showMyDialog(context); + await model.changeClinic(newValue, authenticationViewModel); + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); } }, - items: projectsProvider - .doctorClinicsList - .map((item) { + items: projectsProvider.doctorClinicsList.map((item) { return DropdownMenuItem( child: AppText( - Utils.convertToTitleCase( - item.clinicName), + Utils.convertToTitleCase(item.clinicName), fontSize: 14, letterSpacing: -0.96, color: AppGlobal.appTextColor, @@ -229,8 +183,7 @@ class _HomeScreenState extends State { )), ], ) - : AppText( - TranslationBase.of(context).noClinic), + : AppText(TranslationBase.of(context).noClinic), ), ], ), @@ -260,22 +213,16 @@ class _HomeScreenState extends State { ? FractionallySizedBox( widthFactor: 0.90, child: Container( - child: Column( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - SizedBox( - height: 10, - ), - sliderActiveIndex == 1 - ? DashboardSliderItemWidget( - model.dashboardItemsList[4]) - : sliderActiveIndex == 0 - ? DashboardSliderItemWidget( - model.dashboardItemsList[3]) - : DashboardSliderItemWidget( - model.dashboardItemsList[6]), - ]))) + child: Column(mainAxisAlignment: MainAxisAlignment.start, children: [ + SizedBox( + height: 10, + ), + sliderActiveIndex == 1 + ? DashboardSliderItemWidget(model.dashboardItemsList[4]) + : sliderActiveIndex == 0 + ? DashboardSliderItemWidget(model.dashboardItemsList[3]) + : DashboardSliderItemWidget(model.dashboardItemsList[6]), + ]))) : SizedBox(), ], ) @@ -314,12 +261,9 @@ class _HomeScreenState extends State { : SizeConfig.isHeightLarge ? 15 : 13), - child: ListView( - scrollDirection: Axis.horizontal, - children: [ - ...homePatientsCardsWidget( - model, projectsProvider), - ])), + child: ListView(scrollDirection: Axis.horizontal, children: [ + ...homePatientsCardsWidget(model, projectsProvider), + ])), SizedBox( height: 20, ), @@ -336,27 +280,28 @@ class _HomeScreenState extends State { ); } - List homePatientsCardsWidget( - DashboardViewModel model, projectsProvider) { + showRadiologyFindingDialog(DashboardViewModel model) { + Utils.showConfirmationDialog(context, model.radiologyCriticalFindingModel.notificationMesssage, () async { + Navigator.of(context).pop(); + GifLoaderDialogUtils.showMyDialog(context); + await model.acknowledgeRadiologyCriticalFinding(model.radiologyCriticalFindingModel.invoiceNo.toString(), model.radiologyCriticalFindingModel.invoiceLineItemNo.toString()); + GifLoaderDialogUtils.hideDialog(context); + }, isShowCancelButton: false); + } + + List homePatientsCardsWidget(DashboardViewModel model, projectsProvider) { colorIndex = 0; List backgroundColors = List(3); - backgroundColors[0] = LinearGradient( - begin: Alignment(-1.0, -2.0), - end: Alignment(1.0, 2.0), - colors: [ - AppGlobal.appRedColor, - Color(0xFFAD3B3B), - ]); //AppGlobal.appRedColor; - backgroundColors[1] = - LinearGradient(begin: Alignment.center, end: Alignment.center, colors: [ + backgroundColors[0] = LinearGradient(begin: Alignment(-1.0, -2.0), end: Alignment(1.0, 2.0), colors: [ + AppGlobal.appRedColor, + Color(0xFFAD3B3B), + ]); //AppGlobal.appRedColor; + backgroundColors[1] = LinearGradient(begin: Alignment.center, end: Alignment.center, colors: [ Color(0xFFC9C9C9), Color(0xFFC9C9C9), ]); - backgroundColors[2] = LinearGradient( - begin: Alignment.center, - end: Alignment.center, - colors: [Color(0xFF71787E), AppGlobal.appTextColor]); + backgroundColors[2] = LinearGradient(begin: Alignment.center, end: Alignment.center, colors: [Color(0xFF71787E), AppGlobal.appTextColor]); List backgroundIconColors = List(3); backgroundIconColors[0] = Colors.white12; backgroundIconColors[1] = Colors.white38; @@ -375,8 +320,7 @@ class _HomeScreenState extends State { cardIcon: DoctorApp.livecare, textColor: textColors[colorIndex], iconSize: 21, - text: - "${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}", + text: "${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}", onTap: () { // TODO MOSA TEST // PatiantInformtion patient = PatiantInformtion( @@ -411,13 +355,12 @@ class _HomeScreenState extends State { backgroundIconColor: backgroundIconColors[colorIndex], cardIcon: DoctorApp.qr_reader, textColor: textColors[colorIndex], - text: "ER sign In" , + text: "ER sign In", onTap: () { Navigator.push( context, FadePage( - page: ErSignInScreen( - ), + page: ErSignInScreen(), ), ); }, @@ -435,8 +378,7 @@ class _HomeScreenState extends State { context, FadePage( page: InPatientScreen( - specialClinic: model.getSpecialClinic( - clinicId ?? projectsProvider.doctorClinicsList[0].clinicID), + specialClinic: model.getSpecialClinic(clinicId ?? projectsProvider.doctorClinicsList[0].clinicID), ), ), ); @@ -469,19 +411,13 @@ class _HomeScreenState extends State { textColor: textColors[colorIndex], text: TranslationBase.of(context).myOutPatient_2lines, onTap: () { - String date = AppDateUtils.convertDateToFormat( - DateTime( - DateTime.now().year, DateTime.now().month, DateTime.now().day), - 'yyyy-MM-dd'); + String date = AppDateUtils.convertDateToFormat(DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); Navigator.push( context, MaterialPageRoute( builder: (context) => OutPatientsScreen( - patientSearchRequestModel: PatientSearchRequestModel( - from: date, - to: date, - doctorID: authenticationViewModel.doctorProfile.doctorID), + patientSearchRequestModel: PatientSearchRequestModel(from: date, to: date, doctorID: authenticationViewModel.doctorProfile.doctorID), ), settings: RouteSettings(name: 'OutPatientsScreen'), )); @@ -541,10 +477,7 @@ class _HomeScreenState extends State { )); changeColorIndex(); - return [ - ...List.generate(patientCards.length, (index) => patientCards[index]) - .toList() - ]; + return [...List.generate(patientCards.length, (index) => patientCards[index]).toList()]; } changeColorIndex() { diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 9907a032..397c24f0 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -26,7 +26,7 @@ class Utils { get currentLanguage => null; - static showConfirmationDialog(BuildContext context, String message, Function okFunction) { + static showConfirmationDialog(BuildContext context, String message, Function okFunction, {bool isShowCancelButton = true}) { return showDialog( context: context, barrierDismissible: false, // user must tap button! @@ -47,14 +47,18 @@ class Utils { fontColor: Colors.white, color: AppGlobal.appGreenColor, ), - AppButton( - onPressed: () { - Navigator.of(context).pop(); - }, - title: TranslationBase.of(context).cancel, - fontColor: Colors.white, - color: Colors.red[600], + SizedBox( + height: 30, ), + if (isShowCancelButton) + AppButton( + onPressed: () { + Navigator.of(context).pop(); + }, + title: TranslationBase.of(context).cancel, + fontColor: Colors.white, + color: Colors.red[600], + ), ], ), ], diff --git a/lib/widgets/dialog/confirm_dialog.dart b/lib/widgets/dialog/confirm_dialog.dart index 284f4072..75beb19c 100644 --- a/lib/widgets/dialog/confirm_dialog.dart +++ b/lib/widgets/dialog/confirm_dialog.dart @@ -15,26 +15,26 @@ class ConfirmationDialog extends StatefulWidget { } class _ConfirmationDialogState extends State { - @override Widget build(BuildContext context) { - return AlertDialog( + return AlertDialog( title: Text("Alert"), content: Text(widget.title), actions: [ TextButton( child: Text(TranslationBase.of(context).cancel), - onPressed: () { Navigator.pop(context);}, + onPressed: () { + Navigator.pop(context); + }, ), - TextButton( - child: Text(TranslationBase.of(context).ok), - onPressed: () { - Navigator.pop(context); - widget.onTapGrant(); - }, - ) + TextButton( + child: Text(TranslationBase.of(context).ok), + onPressed: () { + Navigator.pop(context); + widget.onTapGrant(); + }, + ) ], ); } - }