NIB / PLAYGROUND
Dialog playground — NibComponents
Try dialog in Flutter. Open a focused task, return a typed result, and choose who owns its lifetime.
Open interactive viewOpen a focused task, return a typed result, and choose who owns its lifetime.
Read the full component guide and API
Public widgets and APIs
- NibDialog
- NibDialogAnimation
- NibDialogSize
- nibDialogMaxWidth
- resolveNibDialogEnter
- NibDialogController
- NibDialogHandle
- NibDialogScope
- openNibDialog
- showNibDialog
Example Dart code
final result = await showNibDialog<String>(
context,
title: 'Choose a title',
content: Builder(builder: (dialogContext) => NibButton(
label: 'Use this title',
onPressed: () => NibDialogScope.of(dialogContext).close('Draft'),
)),
);
if (!context.mounted) return;
// result is 'Draft', or null when dismissed.Playground controls
| Control | Type | Options or range | Help |
|---|---|---|---|
| Surface title | text | ||
| Entrance preset | choice | none, fade, scale, fadeScale, slideUp | |
| Surface size | choice | sm, md, lg, fullscreen | |
| Allow outside dismissal | toggle | ||
| Animate opening and closing | toggle |