update method
override
Updates the golden file identified by golden
with imageBytes
.
This will be invoked in lieu of compare when autoUpdateGoldenFiles
is true
(which gets set automatically by the test framework when the
user runs flutter test --update-goldens
).
The method by which golden
is located and by which its bytes are written
is left up to the implementation class.
Implementation
@override
Future<void> update(Uri golden, Uint8List imageBytes) async {
final _Result result = await _postAndWait(imageBytes, golden, operation: 'update');
if (result is _Failure) {
return Future<void>.error(result.error);
}
}