FfGoldenFileComparator class
A Flutter local-file comparator that applies a GoldenTolerance.
- Inheritance
-
- Object
- GoldenFileComparator
- LocalFileComparator
- FfGoldenFileComparator
Constructors
- FfGoldenFileComparator(Uri testFile, {GoldenTolerance tolerance = GoldenTolerance.strict})
-
Creates a comparator rooted at
testFile.
Properties
- basedir → Uri
-
The directory in which the test was loaded.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tolerance → GoldenTolerance
-
The policy applied to every comparison.
final
Methods
-
compare(
Uint8List imageBytes, Uri golden) → Future< bool> -
Compares
imageByteswithgoldenand writes Flutter failure artifacts when the configured tolerance is exceeded.override -
generateFailureOutput(
ComparisonResult result, Uri golden, Uri basedir, {String key = ''}) → Future< String> -
Writes out diffs from the ComparisonResult of a golden file test.
inherited
-
getFailureFile(
String failure, Uri golden, Uri basedir) → File -
Returns the appropriate file for a given diff from a ComparisonResult.
inherited
-
getGoldenBytes(
Uri golden) → Future< List< int> > -
Returns the bytes of the given
goldenfile.inherited -
getTestUri(
Uri key, int? version) → Uri -
Returns a new golden file Uri to incorporate any
versionnumber with thekey.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Uri golden, Uint8List imageBytes) → Future< void> -
Updates the golden file identified by
goldenwithimageBytes.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited