diff --git a/packages/flutter/lib/src/material/bottom_sheet.dart b/packages/flutter/lib/src/material/bottom_sheet.dart index d247e20426..0bff512677 100644 --- a/packages/flutter/lib/src/material/bottom_sheet.dart +++ b/packages/flutter/lib/src/material/bottom_sheet.dart @@ -53,11 +53,13 @@ class BottomSheet extends StatefulWidget { Key key, this.animationController, this.enableDrag = true, + this.elevation = 0.0, @required this.onClosing, @required this.builder }) : assert(enableDrag != null), assert(onClosing != null), assert(builder != null), + assert(elevation != null), super(key: key); /// The animation that controls the bottom sheet's position. @@ -85,6 +87,12 @@ class BottomSheet extends StatefulWidget { /// Default is true. final bool enableDrag; + /// The z-coordinate at which to place this material. This controls the size + /// of the shadow below the material. + /// + /// Defaults to 0. + final double elevation; + @override _BottomSheetState createState() => _BottomSheetState(); @@ -137,6 +145,7 @@ class _BottomSheetState extends State { Widget build(BuildContext context) { final Widget bottomSheet = Material( key: _childKey, + elevation: widget.elevation, child: widget.builder(context), ); return !widget.enableDrag ? bottomSheet : GestureDetector(