matches method
override
Does the matching of the actual vs expected values.
item is the actual value. matchState can be supplied
and may be used to add details about the mismatch that are too
costly to determine in describeMismatch.
Implementation
@override
bool matches(dynamic item, Map<Object?, Object?> matchState) {
if (item is! Result) return false;
if (!item.isFailure) return false;
if (!_outcomesEqual(item.outcomes, _expectedOutcomes)) return false;
if (_checkContext && !_expectedContext!.matches(item.context, matchState)) return false;
return true;
}