withOpticalSize method

  1. @useResult
WidgetSelector<Icon> withOpticalSize(
  1. double? value
)

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

Example usage:

spot<Icon>().withOpticalSize(10.5).existsOnce();

Implementation

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