showBodyScrim method

void showBodyScrim(
  1. bool value,
  2. double opacity
)

Whether to show a ModalBarrier over the body of the scaffold.

Implementation

void showBodyScrim(bool value, double opacity) {
  if (_showBodyScrim == value && _bodyScrimColor.opacity == opacity) {
    return;
  }
  setState(() {
    _showBodyScrim = value;
    _bodyScrimColor = Colors.black.withOpacity(opacity);
  });
}