wetransfer 0.2.0 copy "wetransfer: ^0.2.0" to clipboard
wetransfer: ^0.2.0 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.type}'));

   print('Uploaded all files');

   print("Finalizing transfer");

   String url = await client.finalizeTransfer(transfer);

   //Dont forget to close the client when you don't need it anymore
   client?.close();
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, path, unique_ids, xml

More

Packages that depend on wetransfer