confirm static method
Future<bool?>
confirm(
- BuildContext context,
- String message, {
- String title = '确认操作',
- String confirmLabel = '确定',
- String cancelLabel = '取消',
- 确认对话框
Implementation
static Future<bool?> confirm(
BuildContext context,
String message, {
String title = '确认操作',
String confirmLabel = '确定',
String cancelLabel = '取消',
}) {
return show<bool>(
context,
type: NZDialogType.confirm,
title: title,
message: message,
actions: [
NZDialogAction(
label: cancelLabel,
onPressed: () => Navigator.pop(context, false),
),
NZDialogAction(
label: confirmLabel,
isPrimary: true,
onPressed: () => Navigator.pop(context, true),
),
],
);
}