Read page as text

NIB / PLAYGROUND

Bottom sheet playground — NibComponents

Try bottom sheet in Flutter. Let a local task expand between snap heights and return a typed result.

Open interactive view

Let a local task expand between snap heights and return a typed result.

Read the full component guide and API

Public widgets and APIs

  • NibBottomSheet
  • NibBottomSheetController
  • NibBottomSheetHandle
  • NibBottomSheetScope
  • openNibBottomSheet
  • showNibBottomSheet
  • clampInitialSnapIndex
  • kNibSheetFlingVelocity
  • kNibSheetMinExtent
  • normalizeSnapExtents
  • resolveSnapTarget

Example Dart code

final result = await showNibBottomSheet<String>(
  context,
  title: 'Reading list',
  snapPoints: const [.45, .85],
  initialSnap: 0,
  content: Builder(builder: (sheetContext) => NibButton(
    label: 'Use list',
    onPressed: () => NibBottomSheetScope.of(sheetContext).close('selected'),
  )),
);

Playground controls

ControlTypeOptions or rangeHelp
Surface titletext
First snap: percent of available heightnumber30.0–60.0
Show drag handletoggle
Allow outside dismissaltoggle
Animate opening and closingtoggle