hasProperty function Null safety

Matcher hasProperty(
  1. String name,
  2. [dynamic matcher]
)

Returns a matcher that checks if a class instance has a property with name name, and optionally, if that property in turn satisfies a matcher.

Implementation

Matcher hasProperty(String name, [matcher]) =>
    _HasProperty(name, matcher == null ? null : wrapMatcher(matcher));