withIcon method
Creates a WidgetSelector that finds all IconButton where icon equals (==) value
.
Example usage:
spot<IconButton>().withIcon(Container()).existsOnce();
Implementation
@useResult
WidgetSelector<IconButton> withIcon(Widget? value) {
return withDiagnosticProp<Widget>(
'icon', (it) => value == null ? it.isNull() : it.equals(value));
}