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
This commit is contained in:
Alejandro Santiago 2024-06-17 23:00:12 +01:00 committed by GitHub
parent e0ddad034b
commit a97a9b33fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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