WeTransferClient class


WeTransferClient({Credentials credentials})


client Client
credentials Credentials
decoder JsonDecoder
encoder JsonEncoder
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


close() → void
Closes the client and cleans up any resources associated with it. It's important to close each client when it's done being used; failing to do so can cause the Dart process to hang. [...]
completeFileUpload(String transferId, WeTransferFile file) Stream<CompleteFileUploadState>
Informs the server that all the uploads of this transfer are done.
createTransfer(List<File> files, [String message = "Sample WeTransfer transfer ;)"]) Future<Transfer>
Creates a new Transfer from a list of files to upload. message is the message the user who downloads the files will see.
finalizeTransfer(Transfer transfer) Future<String>
Closes the transfer for modification, and makes it available for download.
getTransferInfo(String transferId) Future<Transfer>
Gets the download url of a transfer
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
requestUploadURL(String transferId, WeTransferFile file, int part) Future<String>
Gets the designated server url for a specific file part [...]
toString() String
Returns a string representation of this object.
uploadFile(String transferId, LocalWeTransferFile file) Stream<FileTransferState>
Uploads a single file
uploadFiles(Transfer transfer) Stream<FileTransferState>
Uploads all files of the provided Transfer


operator ==(Object other) bool
The equality operator. [...]

Static Methods

create(String apiKey) Future<WeTransferClient>
Creates an instance of WeTransferClient. Internally registers the device as a user and stores a user token