withOpacity method

  1. @useResult
WidgetSelector<Opacity> withOpacity(
  1. double? value
)

Creates a WidgetSelector that finds all Opacity where opacity equals (==) value.

Example usage:

spot<Opacity>().withOpacity(10.5).existsOnce();

Implementation

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