Verc
Verc

Reputation: 195

How to share a link and a finished text using Share

I use the Share package so that when I click on the icon I can share the link. I would also like that when I share my link, I have a ready-made text description of this link. I tried to do this through Subject, but the result is the link itself without text.

 onTap: () {
  Share.share('https://www.youtube.com', subject:  'Nice Service');
 },

Upvotes: 0

Views: 5387

Answers (1)

eamirho3ein
eamirho3ein

Reputation: 17940

You can use this:

await Share.share(
        'https://www.youtube.com' + ',' + 'Nice Service',
      );

Update: use new share_plus package like this:

Share.share('https://www.youtube.com', subject: 'Nice Service');

Upvotes: 3

Related Questions