BottomSheet
Sliding panel from the bottom of the screen.
File: example/lib/widgets/bottom_sheet.dart
Factory Methods
FBBottomSheet.basic()- Standard bottom sheetFBBottomSheet.modal()- Modal overlay sheetFBBottomSheet.persistent()- Persistent layoutFBBottomSheet.expanded()- Full screen sheet
Properties
title: String
child: Widget
height: double
isDismissible: bool
enableDrag: bool
backgroundColor: Color
shape: ShapeBorder
Usage Example
showModalBottomSheet(
context: context,
builder: (_) => FBBottomSheet.modal(
title: 'Options',
child: ListView(
children: [
ListTile(title: Text('Option 1')),
ListTile(title: Text('Option 2')),
ListTile(title: Text('Option 3')),
],
),
),
)
Menu Bottom Sheet
FBBottomSheet.basic(
title: 'Share Options',
child: Column(
children: [
TextButton(
onPressed: () => share('Facebook'),
child: Text('Share to Facebook'),
),
TextButton(
onPressed: () => share('Twitter'),
child: Text('Share to Twitter'),
),
],
),
)