ScreenshotCallback typedef Null safety
A callback to use with integrationDriver.
The callback receives the name of screenshot passed to
a PNG byte buffer.
The callback returns
true if the test passes or
You can use this callback to store the bytes locally in a file or upload them to a service that compares the image against a gold or baseline version.
Since the function is executed on the host driving the test, you can access any environment variable from it.
typedef ScreenshotCallback = Future<bool> Function(String name, List<int> image);