error static method

Future<void> error(
  1. BuildContext context,
  2. String message, {
  3. String title = '出错了',
})

Implementation

static Future<void> error(
  BuildContext context,
  String message, {
  String title = '出错了',
}) {
  return show(
    context,
    type: NZDialogType.error,
    title: title,
    message: message,
    icon: Icons.error_rounded,
    iconColor: Colors.red,
    actions: [
      NZDialogAction(
        label: '返回',
        isPrimary: true,
        onPressed: () => Navigator.pop(context),
      ),
    ],
  );
}