MacroMath UI
Components · App

Confirm dialog

Unified confirmation dialog, with a destructive variant.

App · Flutter · macromath_mobile

A confirmation dialog that stays consistent across the app: two text buttons — "Cancel" in grey and the main action colored only in text (orange, or red when destructive). Imported from macromath_mobile.

Preview

Delete food
Are you sure? This action cannot be undone.
Cancel Delete

Parameters

ParameterTypeDefaultDescription
titleStringDialog title.
messageString?nullSupporting text.
confirmLabelString'Confirm'Main action label.
cancelLabelString'Cancel'Cancel label.
destructiveboolfalsePaints the action red.

Usage

import 'package:macromath_mobile/presentation/widgets/app_confirm_dialog.dart';

final ok = await AppConfirmDialog.show(
  context,
  title: 'Delete food',
  message: 'Are you sure? This action cannot be undone.',
  confirmLabel: 'Delete',
  destructive: true,
);
if (ok) { /* ... */ }

Open it live in the WidgetbookFeedback › Confirm dialog.

On this page