saveFile static method

Future<File> saveFile(
  1. File sourceFile,
  2. String filename
)

Salva un file sourceFile nella directory dell'app con nome filename. Restituisce il nuovo file copiato.

Implementation

static Future<File> saveFile(File sourceFile, String filename) async {
  final path = await _localPath;
  final newPath = p.join(path, filename);
  return sourceFile.copy(newPath);
}