NIB / PLAYGROUND
Alert dialog playground — NibComponents
Try alert dialog in Flutter. Ask for a decision and distinguish confirmation, cancellation, and dismissal.
Open interactive viewAsk for a decision and distinguish confirmation, cancellation, and dismissal.
Read the full component guide and API
Public widgets and APIs
- NibAlertSeverity
- NibAlertSeverityX
- showNibAlertDialog
Example Dart code
final confirmed = await showNibAlertDialog(
context,
title: 'Use this label?',
description: 'This changes the local preview only.',
severity: NibAlertSeverity.info,
confirmText: 'Apply locally',
cancelText: 'Keep current',
);
if (!context.mounted) return;
if (confirmed == true) { /* Apply the confirmed change. */ }Playground controls
| Control | Type | Options or range | Help |
|---|---|---|---|
| Surface title | text | ||
| Severity | choice | info, success, warning, error | |
| Allow outside dismissal | toggle | ||
| Adaptive platform presentation | toggle | ||
| Animate opening and closing | toggle |