diff --git a/engine/src/flutter/lib/web_ui/test/matchers.dart b/engine/src/flutter/lib/web_ui/test/matchers.dart index c8ff6ba4f59..d06ee239cca 100644 --- a/engine/src/flutter/lib/web_ui/test/matchers.dart +++ b/engine/src/flutter/lib/web_ui/test/matchers.dart @@ -138,12 +138,12 @@ Matcher within({ @required T from, DistanceFunction 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.'); }