cancelBtn method

Widget cancelBtn(
  1. dynamic context
)

Implementation

Widget cancelBtn(context) {
  final showCancelBtn =
      options.type == QuickAlertType.confirm ? true : options.showCancelBtn!;

  final cancelBtn = buildButton(
      context: context,
      isOkayBtn: false,
      text: options.cancelBtnText!,
      onTap: () {
        options.timer?.cancel();
        options.onCancelBtnTap != null
            ? options.onCancelBtnTap!()
            : Navigator.pop(context);
      });

  if (showCancelBtn) {
    return Expanded(child: cancelBtn);
  } else {
    return const SizedBox();
  }
}