mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix withIn matcher distance function lookup (flutter/engine#13904)
This commit is contained in:
parent
2cef3235a9
commit
89438f0dc1
@ -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.');
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user