whereStyle method

Creates a WidgetSelector that finds all ElevatedButton where style matches the condition.

Example usage:

spot<ElevatedButton>().whereStyle((it) => it.equals(ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.blue)))).existsOnce();

Implementation

@useResult
WidgetSelector<ElevatedButton> whereStyle(MatchProp<ButtonStyle> match) {
  return withDiagnosticProp<ButtonStyle>('style', match);
}