withFit method

  1. @useResult
WidgetSelector<Image> withFit(
  1. BoxFit? value
)

Creates a WidgetSelector that finds all Image where fit equals (==) value.

Example usage:

spot<Image>().withFit(BoxFit.values.first).existsOnce();

Implementation

@useResult
WidgetSelector<Image> withFit(BoxFit? value) {
  return withDiagnosticProp<BoxFit>(
      'fit', (it) => value == null ? it.isNull() : it.equals(value));
}