constraints property

BoxConstraints? constraints
final

Defines minimum and maximum sizes for a BottomSheet.

If null, the ambient ThemeData.bottomSheetTheme's BottomSheetThemeData.constraints will be used. If that is null and ThemeData.useMaterial3 is true, then the bottom sheet will have a max width of 640dp. If ThemeData.useMaterial3 is false, then the bottom sheet's size will be constrained by its parent (usually a Scaffold). In this case, consider limiting the width by setting smaller constraints for large screens.

If constraints are specified (either in this property or in the theme), the bottom sheet will be aligned to the bottom-center of the available space. Otherwise, no alignment is applied.

Implementation

final BoxConstraints? constraints;