in lib/src/core_matchers.dart [231:245]
bool matches(Object? item, Map matchState) {
var expected = _expected;
if (item is String) {
return expected is Pattern && item.contains(expected);
} else if (item is Iterable) {
if (expected is Matcher) {
return item.any((e) => expected.matches(e, matchState));
} else {
return item.contains(_expected);
}
} else if (item is Map) {
return item.containsKey(_expected);
}
return false;
}