pasteLocalFile method

  1. @override
Future<SafNewFile> pasteLocalFile(
  1. String srcPath,
  2. String treeUri,
  3. String fileName,
  4. String mime, {
  5. bool? overwrite,
})
override

Implementation

@override
Future<SafNewFile> pasteLocalFile(
    String srcPath, String treeUri, String fileName, String mime,
    {bool? overwrite}) async {
  var map =
      await methodChannel.invokeMapMethod<String, dynamic>('pasteLocalFile', {
    'localSrc': srcPath,
    'treeUri': treeUri.toString(),
    'fileName': fileName,
    'mime': mime,
    'overwrite': overwrite ?? false,
  });
  if (map == null) {
    throw Exception('Unexpected empty response from `pasteLocalFile`');
  }
  return SafNewFile.fromMap(map);
}