hasBackground method

WidgetMatcher<Container> hasBackground(
  1. Decoration? value
)

Expects that background of Container equals (==) value.

Example usage:

spot<Container>().existsOnce().hasBackground(BoxDecoration(color: Colors.blue));

Implementation

WidgetMatcher<Container> hasBackground(Decoration? value) {
  return hasDiagnosticProp<Decoration>(
      'bg', (it) => value == null ? it.isNull() : it.equals(value));
}