bottomSheetScrimBuilder property

Widget? Function(BuildContext, Animation<double>) bottomSheetScrimBuilder
final

A builder for the widget that obscures primary content while a bottom sheet is open.

The builder receives the current BuildContext and an Animation as parameters. The Animation ranges from 0.0 to 1.0 based on how much the bottom sheet covers the screen. A value of 0.0 represents when the bottom sheet covers 70% of the screen, and 1.0 represents when the bottom sheet fully covers the screen.

If this is null, then a non-dismissable ModalBarrier with Colors.black is used. The barrier is animated to fade in and out as the bottom sheet is opened and closed.

If the builder returns null, then no scrim is shown.

Implementation

final Widget? Function(BuildContext, Animation<double>) bottomSheetScrimBuilder;