hasStyle method

WidgetMatcher<TextButton> hasStyle(
  1. ButtonStyle? value
)

Expects that style of TextButton equals (==) value.

Example usage:

spot<TextButton>().existsOnce().hasStyle(ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.blue)));

Implementation

WidgetMatcher<TextButton> hasStyle(ButtonStyle? value) {
  return hasDiagnosticProp<ButtonStyle>(
      'style', (it) => value == null ? it.isNull() : it.equals(value));
}