openMaterialModalBottomSheet function
Future
openMaterialModalBottomSheet(
- BuildContext context,
- Widget content,
- ModalBottomSheetProps props
Implementation
Future openMaterialModalBottomSheet(
BuildContext context, Widget content, ModalBottomSheetProps props) {
final sheetTheme = Theme.of(context).bottomSheetTheme;
return showModalBottomSheet(
context: context,
barrierLabel: props.barrierLabel,
scrollControlDisabledMaxHeightRatio:
props.scrollControlDisabledMaxHeightRatio,
showDragHandle: props.showDragHandle,
sheetAnimationStyle: props.sheetAnimationStyle,
useSafeArea: props.useSafeArea,
barrierColor: props.barrierColor,
backgroundColor: props.backgroundColor ??
sheetTheme.modalBackgroundColor ??
sheetTheme.backgroundColor,
isDismissible: props.barrierDismissible,
isScrollControlled: props.isScrollControlled,
enableDrag: props.enableDrag,
clipBehavior: props.clipBehavior,
elevation: props.elevation,
shape: props.shape,
anchorPoint: props.anchorPoint,
useRootNavigator: props.useRootNavigator,
transitionAnimationController: props.animation,
constraints: props.constraints,
routeSettings: props.routeSettings,
builder: (ctx) {
return Container(
margin: EdgeInsets.only(bottom: MediaQuery.of(ctx).viewInsets.bottom),
child: content,
);
},
);
}