|
|
|
|
@ -18,6 +18,7 @@ import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
|
import 'package:barcode_scan2/barcode_scan2.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:hmg_patient_app_new/widgets/nfc/nfc_reader_sheet.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
|
|
|
|
|
@ -139,14 +140,13 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void sendCheckInRequest(String scannedCode, BuildContext context) async {
|
|
|
|
|
showCommonBottomSheet(context,
|
|
|
|
|
child: Utils.getLoadingWidget(), callBackFunc: (str) {}, title: "", height: ResponsiveExtension.screenHeight * 0.3, isCloseButtonVisible: false, isDismissible: false, isFullScreen: false);
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: "Processing Check-In...".needTranslation);
|
|
|
|
|
await myAppointmentsViewModel.sendCheckInNfcRequest(
|
|
|
|
|
patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
|
|
|
|
|
scannedCode: scannedCode,
|
|
|
|
|
checkInType: 2,
|
|
|
|
|
onSuccess: (apiResponse) {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
showCommonBottomSheetWithoutHeight(context, title: "Success".needTranslation, child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr()), callBackFunc: () {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
Navigator.pushAndRemoveUntil(
|
|
|
|
|
@ -161,7 +161,7 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
|
|
|
|
|
}, isFullScreen: false);
|
|
|
|
|
},
|
|
|
|
|
onError: (error) {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
showCommonBottomSheetWithoutHeight(context, title: "Error".needTranslation, child: Utils.getErrorWidget(loadingText: error), callBackFunc: () {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
}, isFullScreen: false);
|
|
|
|
|
|