bloomBUILD•SHIP•BLOOM
.md

Alert Dialog

BloomAlertDialog

A modal dialog that interrupts the user with important content and expects a response.

bloom ui add alert_dialog
package: bloom_ui
bloom-uiBloomAlertDialog

Usage

BloomAlertDialog.dart
dart
BloomAlertDialog.show(
  context: context,
  title: const BloomDialogTitle('Delete Repository?'),
  description: const BloomDialogDescription('This action cannot be undone and will permanently erase all branches.'),
  cancel: BloomButton(
    variant: BloomButtonVariant.outline,
    size: BloomButtonSize.sm,
    onPressed: () => Navigator.pop(context),
    child: const Text('Cancel'),
  ),
  action: BloomButton(
    variant: BloomButtonVariant.destructive,
    size: BloomButtonSize.sm,
    onPressed: () {},
    child: const Text('Delete'),
  ),
)