withLabel method

  1. @useResult
WidgetSelector<Semantics> withLabel(
  1. String? value
)

Creates a WidgetSelector that finds all Semantics where label equals (==) value.

Example usage:

spot<Semantics>().withLabel('foo').existsOnce();

Implementation

@useResult
WidgetSelector<Semantics> withLabel(String? value) {
  return withDiagnosticProp<String>(
      'label', (it) => value == null ? it.isNull() : it.equals(value));
}