Read page as text

NIB / PLAYGROUND

Alert dialog playground — NibComponents

Try alert dialog in Flutter. Ask for a decision and distinguish confirmation, cancellation, and dismissal.

Open interactive view

Ask 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

ControlTypeOptions or rangeHelp
Surface titletext
Severitychoiceinfo, success, warning, error
Allow outside dismissaltoggle
Adaptive platform presentationtoggle
Animate opening and closingtoggle