whereForeground method

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

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

Example usage:

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

Implementation

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