write method
Writes encoded image bytes for key.
Implementation
@override
Future<void> write(CPDFPageThumbnailKey key, Uint8List bytes) async {
final file = await _fileForKey(key);
final tempFile = File('${file.path}.tmp');
await tempFile.writeAsBytes(bytes, flush: true);
if (await file.exists()) {
await file.delete();
}
await tempFile.rename(file.path);
}