Read page as text

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 view

Open 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

ControlTypeOptions or rangeHelp
Surface titletext
Entrance presetchoicenone, fade, scale, fadeScale, slideUp
Surface sizechoicesm, md, lg, fullscreen
Allow outside dismissaltoggle
Animate opening and closingtoggle