containsProp method

bool containsProp(
  1. void accessProp(
    1. T spiedView
    )
)

Returns whether the prop read within accessProp is specified.

For example:

class FooProps on UiProps {
  // The controlled value of the component.
  String? value;
}

void example(FooProps props) {
  final isControlled = props.containsProp((p) => p.value);
}

Implementation

bool containsProp(void Function(T spiedView) accessProp) => containsKey(getPropKey(accessProp));