whereBackground method

  1. @useResult
WidgetSelector<Container> whereBackground(
  1. MatchProp<Decoration> match
)

Creates a WidgetSelector that finds all Container where background matches the condition.

Example usage:

spot<Container>().whereBackground((it) => it.equals(BoxDecoration(color: Colors.blue))).existsOnce();

Implementation

@useResult
WidgetSelector<Container> whereBackground(MatchProp<Decoration> match) {
  return withDiagnosticProp<Decoration>('bg', match);
}