showModalBioContainer method

void showModalBioContainer({
  1. Key? key,
  2. BioPayload? payload,
  3. BioThemeData? themeData,
  4. bool? showCloseButton,
  5. Widget? closeButton,
  6. Widget? bioCardMoreIcon,
  7. BootpayDefaultCallback? onCancel,
  8. BootpayDefaultCallback? onError,
  9. BootpayCloseCallback? onClose,
  10. BootpayDefaultCallback? onIssued,
  11. BootpayConfirmCallback? onConfirm,
  12. BootpayAsyncConfirmCallback? onConfirmAsync,
  13. BootpayDefaultCallback? onDone,
  14. BuildContext? context,
  15. int? easyType,
  16. bool? isEditMode,
})

Implementation

void showModalBioContainer({

      Key? key,
      BioPayload? payload,
      BioThemeData? themeData,
      bool? showCloseButton,
      Widget? closeButton,
      Widget? bioCardMoreIcon,
      BootpayDefaultCallback? onCancel,
      BootpayDefaultCallback? onError,
      BootpayCloseCallback? onClose,
      // BootpayCloseCallback? onCloseHardware,
      BootpayDefaultCallback? onIssued,
      BootpayConfirmCallback? onConfirm,
      BootpayAsyncConfirmCallback? onConfirmAsync,
      BootpayDefaultCallback? onDone,
      BuildContext? context,
      int? easyType,
      bool? isEditMode,

    }) {

  if(context == null) return;

  bioContainer = BioContainer(
    key: key,
    payload: payload,
    themeData: themeData,
    showCloseButton: showCloseButton,
    closeButton: closeButton,
    bioCardMoreIcon: bioCardMoreIcon,
    onCancel: onCancel,
    onError: onError,
    onClose: onClose,
    // onCloseHardware: onCloseHardware,
    onIssued: onIssued,
    onConfirm: onConfirm,
    onConfirmAsync: onConfirmAsync,
    onDone: onDone,
    easyType: easyType,
    isEditMode: isEditMode,
  );

  isShowModal = true;
  closeController.isBootpayShow = true;

  showModalBottomSheet<void>(
    context: context,
    isScrollControlled: true,
    builder: (BuildContext context) {
      // return SafeArea(child: bioContainer!);
      return bioContainer!;
    },
  ).whenComplete(() {
    isShowModal = false;
    if(closeController.isBootpayShow) { //즉시 실행
      BootpayPrint("bootpayClose call 즉시실행");
      if (onClose != null) onClose();
      closeController.isBootpayShow = false;
    }

    // print('Hey there, I\'m calling after hide bottomSheet');
  });
}