Fix withIn matcher distance function lookup (flutter/engine#13904)

This commit is contained in:
Ferhat 2019-11-18 16:00:01 -08:00 committed by GitHub
parent 2cef3235a9
commit 89438f0dc1

View File

@ -138,12 +138,12 @@ Matcher within<T>({
@required T from,
DistanceFunction<T> distanceFunction,
}) {
distanceFunction ??= _kStandardDistanceFunctions[from.runtimeType];
distanceFunction ??= _kStandardDistanceFunctions[T];
if (distanceFunction == null) {
throw ArgumentError(
'The specified distanceFunction was null, and a standard distance '
'function was not found for type ${from.runtimeType} of the provided '
'function was not found for type ${T} of the provided '
'`from` argument.');
}