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

outdated

A new Flutter package project.

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 yayyy");

   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 new Flutter package project.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, meta, path, unique_ids, xml

More

Packages that depend on wetransfer