-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Request]: share_plus refactor and cleanup #1099
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
Comments
Share files implementation for web to be done in another ticket: #212 |
Since file io isn't supported on web via dart:io it could make sense to use https://pub.dev/packages/cross_file in order to pass files to the share plugin. |
I would happily take this issue on as part of Hacktoberfest, if possible and still free :) |
@ThexXTURBOXx details regarding hacktoberfest will be published soon, be sure to follow Majid on Twitter for more info: https://twitter.com/mhadaily ;) |
There's no ticket "reservation". Whoever gets the PR approved gets it. |
Oh okay, I remembered last year when it worked like this. Sorry about that then! |
I have developed a strategy on how to refactor the plugins. However, I still have two questions about this, because I am not sure which solution is desirable:
Details of this are very welcome in order to achieve the desired refactoring. |
You could create a |
New class
They will have to change as well, but we need to keep the federated plugin architecture, if that's what you mean. (personally, I'd like to get rid of the federated plugin architecture, but that's out of scope for this ticket) |
Alright, then I have the right picture on what needs to be done. Thank you very much for the detailed clarifications! |
I would like to see the new 'share' method to take platform specific configuration objects. // pseudo code
ShareV2.share({
String? content,
String? subject,
File? file,
AndroidShareOptions? androidOptions,
IosShareOptions? iosOptions,
}) {
// implementation
} The That way the method parameters aren't cluttered with parameters and it's also clear which platforms have which options. It's probably also more future-proof. local_auth does something similar for localizations. |
Is this issue fixed already? |
No, not yet. If you want, you can do it :) |
Sure! I would love to. Can you help me a bit, like give me a quick rundown since I am a bit (Its not that I don't know the |
We won't be doing this at the moment, as we plan a general refactor of the plus plugins architecture. |
Plugin
share_plus
Use case
Currently, share_plus is a bit messy:
share
,shareFiles
,shareWithResult
, andshareFilesWithResult
).Proposal
The refactor should:
The text was updated successfully, but these errors were encountered: