Future<File> copyToDirectory(Directory dir) async { final newPath = '${dir.path}${Platform.pathSeparator}$nameWithExtension'; return copy(newPath); }