hasStyleWhere method

Expects that style of ElevatedButton matches the condition in match.

Example usage:

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

Implementation

WidgetMatcher<ElevatedButton> hasStyleWhere(MatchProp<ButtonStyle> match) {
  return hasDiagnosticProp<ButtonStyle>('style', match);
}