save method
Save the file to the specified path you must know how dart projects relate to your root folder to know exactly where to save your images use Directory("lib/src/") to hook into your codebase
Implementation
Future<File> save(String path) async {
final file = File(path);
final bytes = await _cachedBytes;
await file.writeAsBytes(bytes);
return file;
}