fullGlobalOverlay static method

WidgetBuilder fullGlobalOverlay({
  1. Color? color,
  2. double opacity = 0.1,
})

A global overlay that renders with a solid color with a given opacity over the entire Testable widget.

Implementation

static WidgetBuilder fullGlobalOverlay({
  Color? color,
  double opacity = 0.1,
}) =>
    (BuildContext context) => Positioned.fill(
          child: IgnorePointer(
            child: Opacity(
              opacity: opacity,
              child: Container(
                color: TestableRenderController.of(context).overlayColor ??
                    color ??
                    Theme.of(context).errorColor,
              ),
            ),
          ),
        );