Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused arguments in DocumentFile.getContent #107

Closed
clragon opened this issue Nov 7, 2022 · 3 comments
Closed

Unused arguments in DocumentFile.getContent #107

clragon opened this issue Nov 7, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@clragon
Copy link

clragon commented Nov 7, 2022

Describe the bug
Both DocumentFile.getContent and DocumentFile.getContentAsString demand a parameter called Uri destination.
It is unclear to me why this parameter is needed and it is entirely unused in the code.

Expected behavior
I would assume that neither of those functions would take a parameter, as their location is already available in the properties of the DocumentFile itself.

shared_storage:

  • Version 0.5.0
@clragon clragon added the bug Something isn't working label Nov 7, 2022
@clragon clragon changed the title Unused arguments in DocumentFile.getContent Unused arguments in DocumentFile.getContent Nov 7, 2022
@alexrintt
Copy link
Owner

alexrintt commented Nov 7, 2022

You're right, for now you can use:

// Workaround <= 0.5.0
uri.getContentAsString(uri);

And since it's a breaking change, I'll release a fix in the next major version v0.6.0.

Thanks for the issue.

@alexrintt
Copy link
Owner

alexrintt commented Nov 8, 2022

v0.6.0 available at pub.dev: pub.dev/packages/shared_storage.

@clragon
Copy link
Author

clragon commented Nov 8, 2022

thank you!

@clragon clragon closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants