success static method

Future<void> success(
  1. BuildContext context,
  2. String message, {
  3. String title = '成功',
})
  1. 成功对话框

Implementation

static Future<void> success(
  BuildContext context,
  String message, {
  String title = '成功',
}) {
  return show(
    context,
    type: NZDialogType.success,
    title: title,
    message: message,
    icon: Icons.check_circle_rounded,
    iconColor: Colors.green,
    actions: [
      NZDialogAction(
        label: '确定',
        isPrimary: true,
        onPressed: () => Navigator.pop(context),
      ),
    ],
  );
}