wetransfer 0.1.1 copy "wetransfer: ^0.1.1" to clipboard
wetransfer: ^0.1.1 copied to clipboard

outdated

A plugin that allows you to transfer files to WeTransfer.

WeTransfer for Flutter #

A Flutter package that allows upload and dowload files to Wetransfer.

How to create a new instance #

Create a new instance with :

WeTransferClient client = await WeTransferClient.create('<api_key>');

Example #

   WeTransferClient client = await WeTransferClient.create('<api_key>');
   
   print("Creating transfer");

   Transfer transfer = await client.createTransfer(
       myFiles.toList(), "Test transfer.");

   print("Transfer with id ${transfer.id} created");
   print("Uploading ${transfer.files.length} files");

   await client.uploadFiles(transfer).forEach((state) =>
       print('${state.file.name} : ${state.sent}/${state.file.size} bytes'));

   print('Uploaded all files');
   print("Completing file uploads");
 
   await client.completeFilesUpload(transfer).forEach((state) => print(
       '${state.done ? 'Completed' : 'Started completing'} ${state.file.name} upload'));

   print('Completed all uploads');
   print("Finalizing transfer");

   String url = await client.finalizeTransfer(transfer);
1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A plugin that allows you to transfer files to WeTransfer.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, meta, path, unique_ids, xml

More

Packages that depend on wetransfer