Jaime Blasco
Committed by GitHub

Update README.md

Showing 1 changed file with 25 additions and 2 deletions
@@ -15,9 +15,32 @@ https://pub.dev/packages/modal_bottom_sheet#-installing-tab-) @@ -15,9 +15,32 @@ https://pub.dev/packages/modal_bottom_sheet#-installing-tab-)
15 15
16 ## Material Modal BottomSheet 16 ## Material Modal BottomSheet
17 17
18 -`showMaterialModalBottomSheet` 18 +```dart
  19 +showMaterialModalBottomSheet(
  20 + context: context,
  21 + builder: (context, scrollController) => Container(),
  22 +})
  23 +```
  24 +What to use this over flutter `showModalBottomSheet`?
  25 +`showMaterialModalBottomSheet` supports closing bottoms sheets by dragging down even if there is a scrollview inside.
  26 +`showModalBottomSheet` won't work correctly with scrollviews
  27 +
  28 +#### Generic params for all modal bottom sheets
  29 +
  30 +| Param | Description |
  31 +|---|---|
  32 +|bool expand = false| The `expand` parameter specifies id the modal bottom sheet will be full screen size or will fit the content child|
  33 +|bool useRootNavigator = false| The `useRootNavigator` parameter ensures that the root navigator is used to display the bottom sheet when set to `true`. This is useful in the case that a modal bottom sheet needs to be displayed above all other content but the caller is inside another `Navigator`. |
  34 +|bool isDismissible = true| The `isDismissible` parameter specifies whether the bottom sheet will be dismissed when user taps on the scrim. |
  35 +|Color barrierColor | The `barrierColor` parameter controls the color of the scrim for this route |
  36 +|bool enableDrag = true| The `enableDrag` parameter specifies whether the bottom sheet can be dragged up and down and dismissed by swiping downwards. |
  37 +|AnimationController secondAnimation| The `secondAnimation` parameter allows you to provide an animation controller that will be used to animate push/pop of the modal route. Using this param is advised against and will be probably removed in future versions |
  38 +|bool bounce = false| The `enableDrag` parameter specifies if the bottom sheet can go beyond the top boundary while dragging |
  39 +
  40 +
  41 +#### Material params
  42 +The optional `backgroundColor`, `elevation`, `shape`, and `clipBehavior` parameters can be passed in to customize the appearance and behavior of material bottom sheets.
19 43
20 -Improved showModalBottomSheet that support scroll and drag at the same time.  
21 44
22 ## Cupertino Modal BottomSheet 45 ## Cupertino Modal BottomSheet
23 46