|
|
|
|
@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
@ -208,12 +209,33 @@ class _BloodDonationBookAppointmentState extends State<BloodDonationBookAppointm
|
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
|
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
Future.delayed(new Duration(milliseconds: 500), () {
|
|
|
|
|
// getToDoCount();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
|
|
|
|
ConfirmDialog dialog = new ConfirmDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
confirmMessage: res['ErrorEndUserMessage'],
|
|
|
|
|
okText: TranslationBase.of(context).ok,
|
|
|
|
|
cancelText: TranslationBase.of(context).cancel_nocaps,
|
|
|
|
|
okFunction: () async {
|
|
|
|
|
// openAppSettings();
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
cancelFunction: () => {});
|
|
|
|
|
dialog.showAlertDialog(context);
|
|
|
|
|
// AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
|
|
|
|
}
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
ConfirmDialog dialog = new ConfirmDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
confirmMessage: err,
|
|
|
|
|
okText: TranslationBase.of(context).ok,
|
|
|
|
|
cancelText: TranslationBase.of(context).cancel_nocaps,
|
|
|
|
|
okFunction: () async {
|
|
|
|
|
// openAppSettings();
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
cancelFunction: () => {});
|
|
|
|
|
dialog.showAlertDialog(context);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|