Created
April 20, 2020 11:50
-
-
Save rvbiljouw/2fd254f7a386e8a6882701bef5f59453 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static Future<String> get _photoLibrary async { | |
final base = await getApplicationDocumentsDirectory(); | |
final directory = | |
await Directory("${base.path}/images/").create(recursive: true); | |
return directory.path; | |
} | |
static Future<File> getFile(String name) async { | |
final path = await _photoLibrary; | |
return File('$path/$name'); | |
} | |
static Future<File> copyFile(File src, File dest) async { | |
return src.copySync(dest.path); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment