okayBtn method
Widget
okayBtn(
- dynamic context
)
Implementation
Widget okayBtn(context) {
if (!options.showConfirmBtn!) {
return const SizedBox();
}
final showCancelBtn =
options.type == QuickAlertType.confirm ? true : options.showCancelBtn!;
final okayBtn = buildButton(
context: context,
isOkayBtn: true,
text: options.confirmBtnText!,
onTap: () {
options.timer?.cancel();
options.onConfirmBtnTap != null
? options.onConfirmBtnTap!()
: Navigator.pop(context);
});
if (showCancelBtn) {
return Expanded(child: okayBtn);
} else {
return okayBtn;
}
}