withCenterSlice method

  1. @useResult
WidgetSelector<Image> withCenterSlice(
  1. Rect? value
)

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

Example usage:

spot<Image>().withCenterSlice(Rect.fromLTWH(0, 0, 100, 100)).existsOnce();

Implementation

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