showConfirmation static method
void
showConfirmation(
- BuildContext context, {
- String? title,
- bool showClose = false,
- dynamic content,
- dynamic cancel = 'Cancel',
- dynamic confirm = 'Confirm',
- Color? cancelBgColor,
- Color? confirmBgColor,
- Color? cancelTextColor,
- Color? confirmTextColor,
- VoidCallback? onCancelPress,
- VoidCallback? onConfirmPress,
- bool barrierDismissible = true,
Implementation
static void showConfirmation(
BuildContext context, {
String? title,
bool showClose = false,
dynamic content,
dynamic cancel = 'Cancel',
dynamic confirm = 'Confirm',
Color? cancelBgColor,
Color? confirmBgColor,
Color? cancelTextColor,
Color? confirmTextColor,
VoidCallback? onCancelPress,
VoidCallback? onConfirmPress,
bool barrierDismissible = true,
}) {
showDialog(
context: context,
barrierDismissible: barrierDismissible,
builder: (context) {
return WillPopScope(
onWillPop: () async => barrierDismissible,
child: AlertDialog(
contentPadding: EdgeInsets.zero,
content: _VxDialog(
title: title,
showClose: showClose,
content: content,
cancel: cancel,
confirm: confirm,
cancelBgColor: cancelBgColor,
confirmBgColor: confirmBgColor,
cancelOnPress: onCancelPress,
confirmOnPress: onConfirmPress,
),
shape: RoundedRectangleBorder(borderRadius: _borderRadius),
),
);
});
}