GoldenFileComparator class

Compares rasterized image bytes against a golden image file.

Instances of this comparator will be used as the backend for matchesGoldenFile.

Instances of this comparator will be invoked by the test framework in the TestWidgetsFlutterBinding.runAsync zone and are thus not subject to the fake async constraints that are normally imposed on widget tests (i.e. the need or the ability to call WidgetTester.pump to advance the microtask queue).

Implementers

Constructors

GoldenFileComparator()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

compare(Uint8List imageBytes, Uri golden) Future<bool>
Compares imageBytes against the golden file identified by golden. [...]
getTestUri(Uri key, int version) Uri
Returns a new golden file Uri to incorporate any version number with the key. [...]
update(Uri golden, Uint8List imageBytes) Future<void>
Updates the golden file identified by golden with imageBytes. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited