hasStyleWhere method

WidgetMatcher<TextButton> hasStyleWhere(
  1. MatchProp<ButtonStyle> match
)

Expects that style of TextButton matches the condition in match.

Example usage:

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

Implementation

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