updateBytes method

  1. @override
Future<void> updateBytes(
  1. Uint8List bytes,
  2. Uri golden
)
override

Compares the pixels of decoded png bytes against the golden file identified by golden.

This will be invoked in lieu of compareBytes when autoUpdateGoldenFiles is true (which gets set automatically by the test framework when the user runs flutter test --update-goldens --platform=chrome).

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> updateBytes(Uint8List bytes, Uri golden) {
  throw UnsupportedError('DefaultWebGoldenComparator is only supported on the web.');
}