plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Request]: Support copying text to clipboard as an option for sharing on web.

Open PaulRudin opened this issue 2 years ago • 4 comments

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.

PaulRudin avatar Sep 07 '22 15:09 PaulRudin

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.

miquelbeltran avatar Sep 07 '22 16:09 miquelbeltran

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.

PaulRudin avatar Sep 08 '22 06:09 PaulRudin

Flutter itself has an API for the Clipboard, see https://api.flutter.dev/flutter/services/Clipboard-class.html

ueman avatar Oct 02 '22 15:10 ueman

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.

rsegecin avatar Dec 28 '23 10:12 rsegecin