From a97a9b33fc938a16f65c8b55d06aad750efc905b Mon Sep 17 00:00:00 2001 From: Alejandro Santiago Date: Mon, 17 Jun 2024 23:00:12 +0100 Subject: [PATCH] Update matchesGoldenFile documentation reference to goldenFileComparator (#150343) Updates the documentation for the [`matchesGoldenFile`](https://api.flutter.dev/flutter/flutter_test/matchesGoldenFile.html) comparator. The documentation currently references the abstract class [`GoldenFileComparator`](https://api.flutter.dev/flutter/flutter_test/GoldenFileComparator-class.html) "as the backend for this matcher", however I believe it should instead reference to [`goldenFileComparator`](https://api.flutter.dev/flutter/flutter_test/goldenFileComparator.html) that also clearly states in its documentation that it is "This comparator is used as the backend for [matchesGoldenFile](https://api.flutter.dev/flutter/flutter_test/matchesGoldenFile.html).". Knowledge about [`goldenFileComparator`](https://api.flutter.dev/flutter/flutter_test/goldenFileComparator.html) is useful for Flutter developers since it is required when trying to set their own custom comparator, and there is currently no reference to it within the [`matchesGoldenFile`](https://api.flutter.dev/flutter/flutter_test/matchesGoldenFile.html). The abstract class [`GoldenFileComparator`](https://api.flutter.dev/flutter/flutter_test/GoldenFileComparator-class.html) is still being referenced within the second suggestion. #76337, precisely https://github.com/flutter/flutter/issues/76337#issuecomment-2172941109 --- packages/flutter_test/lib/src/matchers.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_test/lib/src/matchers.dart b/packages/flutter_test/lib/src/matchers.dart index dfe8f2ea0d1b..1482821b4024 100644 --- a/packages/flutter_test/lib/src/matchers.dart +++ b/packages/flutter_test/lib/src/matchers.dart @@ -538,7 +538,7 @@ Matcher coversSameAreaAs(Path expectedPath, { required Rect areaToCompare, int s /// /// See also: /// -/// * [GoldenFileComparator], which acts as the backend for this matcher. +/// * [goldenFileComparator], which acts as the backend for this matcher. /// * [LocalFileComparator], which is the default [GoldenFileComparator] /// implementation for `flutter test`. /// * [matchesReferenceImage], which should be used instead if you want to