getGoldenBytes method

  1. @protected
Future<List<int>> getGoldenBytes(
  1. Uri golden

Returns the bytes of the given golden file.

If the file cannot be found, an error will be thrown.


Future<List<int>> getGoldenBytes(Uri golden) async {
  final File goldenFile = _getGoldenFile(golden);
  if (!goldenFile.existsSync()) {
      'Could not be compared against non-existent file: "$golden"'
  final List<int> goldenBytes = await goldenFile.readAsBytes();
  return goldenBytes;