getPreviewImageFile method
Get the file to be written to for image export.
Implementation
File getPreviewImageFile(Directory directory, int index) {
String imagePath = path.join(directory.path, 'previewImage$index.jpg');
return File(imagePath);
}