hasConstraints method

WidgetMatcher<ConstrainedBox> hasConstraints(
  1. BoxConstraints? value
)

Expects that constraints of ConstrainedBox equals (==) value.

Example usage:

spot<ConstrainedBox>().existsOnce().hasConstraints(BoxConstraints.tight(Size(100, 100)));

Implementation

WidgetMatcher<ConstrainedBox> hasConstraints(BoxConstraints? value) {
  return hasDiagnosticProp<BoxConstraints>(
      'constraints', (it) => value == null ? it.isNull() : it.equals(value));
}