withController method

  1. @useResult
WidgetSelector<GridView> withController(
  1. ScrollController? value
)

Creates a WidgetSelector that finds all GridView where controller equals (==) value.

Example usage:

spot<GridView>().withController(ScrollController()).existsOnce();

Implementation

@useResult
WidgetSelector<GridView> withController(ScrollController? value) {
  return withDiagnosticProp<ScrollController>(
      'controller', (it) => value == null ? it.isNull() : it.equals(value));
}