copyTo method

  1. @override
Future<SafDocumentFile> copyTo(
  1. String uri,
  2. bool isDir,
  3. String newParentUri
)
override

Implementation

@override
Future<SafDocumentFile> copyTo(
    String uri, bool isDir, String newParentUri) async {
  final map = await methodChannel.invokeMapMethod<String, dynamic>(
    'copyTo',
    {'uri': uri, 'isDir': isDir, 'newParentUri': newParentUri},
  );
  if (map == null) {
    throw Exception('Failed to copy: $uri');
  }
  return SafDocumentFile.fromMap(map);
}