plus_plugins
plus_plugins copied to clipboard
[Request]: Support copying text to clipboard as an option for sharing on web.
Plugin
share_plus
Use case
I'm using share_plus to share some text + a link generated by firebase dynamic links. On the web build share plus makes a mailto: url to share the link, but I'd rather copy the text to the clipboard so that it can be pasted into various places.
Proposal
Provide an option to share by copying to the clipboard.
There are some packages that implement copy to clipboard already: https://pub.dev/packages?q=copy+to+clipboard shouldn't that be enough for you? You could wrap your functionality and decide to use share_plus or a clipboard depending on the platform.
Sure - that's what I'm doing at the moment. But it feels like making share on web to mean just "send an email" as the only option is kind of limiting. These days many people hardly use email at all.
Flutter itself has an API for the Clipboard, see https://api.flutter.dev/flutter/services/Clipboard-class.html
I also agree that this feature is necessary and it would be more elegant to have "copy to clipboard" option along side other suggestions from share plus than implement a workaround which would strictly copy to clipboard on web.