withColor method

  1. @useResult
WidgetSelector<Icon> withColor(
  1. Color? value
)

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

Example usage:

spot<Icon>().withColor(Colors.red).existsOnce();

Implementation

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