Skip to content

Commit a97a9b3

Browse files
authored
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 flutter/flutter#76337 (comment)
1 parent e0ddad0 commit a97a9b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/flutter_test/lib/src/matchers.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ Matcher coversSameAreaAs(Path expectedPath, { required Rect areaToCompare, int s
538538
///
539539
/// See also:
540540
///
541-
/// * [GoldenFileComparator], which acts as the backend for this matcher.
541+
/// * [goldenFileComparator], which acts as the backend for this matcher.
542542
/// * [LocalFileComparator], which is the default [GoldenFileComparator]
543543
/// implementation for `flutter test`.
544544
/// * [matchesReferenceImage], which should be used instead if you want to

0 commit comments

Comments
 (0)