withConstraints method
Creates a WidgetSelector that finds all ConstrainedBox where constraints equals (==) value
.
Example usage:
spot<ConstrainedBox>().withConstraints(BoxConstraints.tight(Size(100, 100))).existsOnce();
Implementation
@useResult
WidgetSelector<ConstrainedBox> withConstraints(BoxConstraints? value) {
return withDiagnosticProp<BoxConstraints>(
'constraints', (it) => value == null ? it.isNull() : it.equals(value));
}