sftpDownload method
Downloads the specified file using SFTP.
var filePath = await client.sftpDownload(
path: "testfile",
toPath: tempPath,
callback: (progress) {
print(progress); // read download progress
},
);
Implementation
Future<String?> sftpDownload({
required String path,
required String toPath,
Callback? callback,
}) async {
downloadCallback = callback;
var result = await _channel.invokeMethod('sftpDownload', {
"id": id,
"path": path,
"toPath": toPath,
});
return result;
}