Open miquelbeltran opened 1 week ago
title
param.The main issue I see is that subject
and title
kind of mean the same thing depending on the implementation. Some users may assume that title
is used when in reality subject
is being used.
A similar solution would be to remove subject
and replace it by title
, and instead create an optional subject
that is only used in email subjects if supported by the platform. That would be a breaking change, but at least is somehow logic.
subject
param.The issue I can see with it, as mentioned in #3306, when a plugin user wants to specify a different subject and title (maybe that's the case for email clients on Android?) so there are side effects that we cannot really know unless we verify on many receiving apps.
This would be interesting when requiring multiple extras, e.g. EXTRA_EMAIL
, although at this point I'd recomment to use android_intent_plus
.
This probably escalates the best for all the platform exclusive params, also like the origin offset and things like that.
Solution 5: add (yet) another method to the interface that's compatible with Web Share API. Specs here
The main issue is probably a confusing interface because then the same thing can be achieved by (at least) two functions
Ad 1) I agree, that would be most logical, but definitely a breaking change
Ad 2) I realized that the unexpected behavior happens in the receiving apps, not in the app using share_plus
while trying to write my first answer, before you posted your opinion on all solutions. I'm not an Android developer, but I try to pick up stuff on the way :smile:
Ad 3/4) I guess that are the most flexible, but least preferable solutions. After all, the nice thing about flutter is that you don't need to know about platforms too much and still have it working as expected
Solution 5: add (yet) another method to the interface that's compatible with Web Share API. Specs here
Yeah, refactoring the three existing methods into a single one is something I'd like to see eventually as well. That would make adding extra options easier, too.
Plugin
share_plus
Use case
As a plugin user I'd like to be able to set the
EXTRA_TITLE
when sharing conent (URL, Text or Files) withshare_plus
when using Android.Proposal
See PRs #3306 and #3270.
Several options:
title
optional parameter. This is only used on Android.subject
as theEXTRA_TITLE
intent extra.Map<String, String>
)Each one has advantages and disadvantages, I'd like to discuss them in this ticket.