withSortKey method

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

Example usage:

spot<Semantics>().withSortKey(OrdinalSortKey(1.0)).existsOnce();

Implementation

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