sftpUpload method

Future<String?> sftpUpload({
  1. required String path,
  2. required String toPath,
  3. Callback? callback,
})

Uploads a file using SFTP.

await client.sftpUpload(
  path: filePath,
  toPath: ".",
  callback: (progress) {
    print(progress); // read upload progress
  },
);

Implementation

Future<String?> sftpUpload({
  required String path,
  required String toPath,
  Callback? callback,
}) async {
  uploadCallback = callback;
  var result = await _channel.invokeMethod('sftpUpload', {
    "id": id,
    "path": path,
    "toPath": toPath,
  });
  return result;
}