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 viewLet 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
| Control | Type | Options or range | Help |
|---|---|---|---|
| Surface title | text | ||
| First snap: percent of available height | number | 30.0–60.0 | |
| Show drag handle | toggle | ||
| Allow outside dismissal | toggle | ||
| Animate opening and closing | toggle |