withIcon method

  1. @useResult
WidgetSelector<Icon> withIcon(
  1. IconData? value
)

Creates a WidgetSelector that finds all Icon where icon equals (==) value.

Example usage:

spot<Icon>().withIcon(Icons.home).existsOnce();

Implementation

@useResult
WidgetSelector<Icon> withIcon(IconData? value) {
  return withDiagnosticProp<IconData>(
      'icon', (it) => value == null ? it.isNull() : it.equals(value));
}