warning static method

Future<void> warning(
  1. BuildContext context,
  2. String message, {
  3. String title = '安全警告',
})

警告对话框

Implementation

static Future<void> warning(
  BuildContext context,
  String message, {
  String title = '安全警告',
}) {
  return show(
    context,
    type: NZDialogType.warning,
    title: title,
    message: message,
    icon: Icons.warning_rounded,
    iconColor: Colors.orange,
    actions: [
      NZDialogAction(
        label: '理解并继续',
        isDestructive: true,
        onPressed: () => Navigator.pop(context),
      ),
    ],
  );
}