I am using two different share plugins in my flutter project. One plugin social_share_plugin and other is social_share . Both are used to share content on social media. Due to limitation of one plugin i have to use both. But i am getting 'Duplicate plugin key: SocialSharePlugin'error when i run the project on IOS device. it is working fine on android device.
var s = await SocialSharePlugin.shareToFeedFacebookLink(
quote: 'Meeting',
url: shareLink,
);
and other plugin is used like
await SocialShare.shareTwitter(
shareText,
hashtags: ["meetup"],
url: shareLink,
trailingText: '#meeting',
);
The issue is
social_shareuses the same class name associal_share_plugin(they both haveSocialSharePlugin). To resolve this, I forked the social_share package and changed every instance ofSocialSharePlugintoSocialShare, including the file names.Here's my forked repo if you would like to use or view: https://github.com/kaarens93/social_share (I have a lot of 'unresolved reference' errors that I'm still in the process of fixing but unless you want to build the package, you shouldn't run into any issues implementing into your project)