save method

Future<String> save(
  1. String filename,
  2. File file
)

Saves the provided file with the specified filename.

Returns a Future that completes with the saved file path.

Implementation

Future<String> save(String filename, File file) {
  return saveAsBytes(filename, file.readAsBytesSync());
}