show static method

void show(
  1. BuildContext context, {
  2. required String title,
  3. String? message,
  4. String buttonLabel = 'OK',
  5. CmdCallback? onDismiss,
})

Show an alert dialog via DialogStack.

Implementation

static void show(
  BuildContext context, {
  required String title,
  String? message,
  String buttonLabel = 'OK',
  CmdCallback? onDismiss,
}) {
  final stack = DialogStack.of(context);
  stack.push(
    DialogAlert(
      title: title,
      message: message,
      buttonLabel: buttonLabel,
      onDismiss: () {
        stack.pop();
        onDismiss?.call();
        return null;
      },
    ),
  );
}