withRenderObject method

  1. @useResult
WidgetSelector<SizedBox> withRenderObject(
  1. RenderConstrainedBox? value
)

Creates a WidgetSelector that finds all SizedBox where renderObject equals (==) value.

Example usage:

spot<SizedBox>().withRenderObject(RenderBox()).existsOnce();

Implementation

@useResult
WidgetSelector<SizedBox> withRenderObject(RenderConstrainedBox? value) {
  return withDiagnosticProp<RenderConstrainedBox>(
      'renderObject', (it) => value == null ? it.isNull() : it.equals(value));
}