Package selection guidance compiled from public package information, community data, and project usage.
A simple and robust Dart library for connecting to FTP servers, enabling seamless file transfers across multiple platforms. It provides a straightforward API to interact with remote FTP servers, supporting common operations like uploading, downloading, listing files, and managing directories. Designed for reliability and ease of use, it integrates smoothly into Flutter applications targeting Android, iOS, macOS, Windows, and Linux. Ideal for apps requiring secure or automated file handling over FTP.
Use cases
File transfer between app and FTP server
Automated backup systems
Remote file management in apps
Syncing app data with FTP storage
Downloading configuration files from FTP
Key features
Cross-platform support
Simple and intuitive API
Robust error handling
Supports file upload/download
Directory listing and navigation
Suitable for
Developers building file-sync apps
Apps needing remote file access
Backend services using FTP
IoT devices managing files via FTP
Educational projects on network protocols
Considerations
Requires stable internet connection
No built-in encryption (use FTPS if needed)
Limited to FTP protocol only
May need firewall configuration
Not suitable for high-security environments without additional measures
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Flutter FTP Connect
Flutter simple and robust dart FTP Connect Library to interact with FTP and SFTP Servers.
//Get directory content
ftpConnect.listDirectoryContent();
//Create directory
ftpConnect.makeDirectory('newDir');
//Change directory
ftpConnect.changeDirectory('moveHereDir');
//get current directory
ftpConnect.currentDirectory();
//Delete directory
ftpConnect.deleteDirectory('dirToDelete');
//Delete a non-empty directory (recursively)
ftpConnect.deleteNonEmptyDirectory('dirToDelete');
//check for directory existance
ftpConnect.checkFolderExistence('dirToCheck');
//create a directory if it does not exist
ftpConnect.createFolderIfNotExist('dirToCreate');
//Upload a local directory recursively to the server
ftpConnect.uploadDirectory(Directory('localDir'), 'remoteDir');
//Download a remote directory recursively
ftpConnect.downloadDirectory('remoteDir', Directory('localDir'));
File functions:
//rename file
ftpConnect.rename('test1.txt', 'test2.txt');
//file size
ftpConnect.sizeFile('test1.txt');
//file existence
ftpConnect.existFile('test1.txt');
//delete file
ftpConnect.deleteFile('test2.zip');
//upload in-memory bytes (no local file needed)
ftpConnect.uploadData(Uint8List.fromList([1, 2, 3]), 'remote.bin');
//download a remote file into memory as bytesfinalUint8List bytes = await ftpConnect.downloadToBytes('remote.bin');
Parameters
Common parameters (FTPConnect and SFTPConnect)
Property
Description
host
Hostname or IP Address
port
Port number (FTP defaults to 21, FTPS to 990, SFTP to 22)
user
Username (Defaults to anonymous)
pass
Password if not anonymous login
showLog
Enable Debug Logging (Defaults to false)
logger
Custom logger
timeout
Timeout in seconds to wait for responses (Defaults to 30)
FTP-only parameters (FTPConnect)
Property
Description
securityType
SecurityType.ftp / ftpes / ftps (Defaults to ftp)
SFTP-only parameters (SFTPConnect)
Property
Description
privateKey
PEM/OpenSSH private key content, used instead of pass
SFTP is provided by the SFTPConnect class, powered by the pure-Dart
dartssh2 package. Both FTPConnect and
SFTPConnect implement the same FileTransferClient interface, so they share
identical method names/signatures and you can swap one for the other by changing
only the instantiated class.
ℹ️ dartssh2 is written in pure Dart, so SFTPConnect works on every
platform supported by Dart/Flutter (except web, which has no raw TCP sockets).
If this plugin was useful to you, helped you to deliver your app, saved you a lot of time, or you just want to support the project, I would be very grateful if you buy me a cup of coffee.