showDestructiveConfirmation static method
Future<bool>
showDestructiveConfirmation({
- required String title,
- String? message,
- required String destructiveTitle,
- VoidCallback? onDestroy,
Shows a destructive confirmation alert.
Implementation
static Future<bool> showDestructiveConfirmation({
required String title,
String? message,
required String destructiveTitle,
VoidCallback? onDestroy,
}) async {
final context = NavigationService.navigatorKey.currentContext;
if (context == null) {
throw StateError('No navigator context available. Make sure NavigationService.navigatorKey is set in your MaterialApp.');
}
return await BaseAlert.showDestructiveConfirmation(
context: context,
title: title,
message: message,
destructiveTitle: destructiveTitle,
onDestroy: onDestroy,
);
}