social_share_plus 0.0.1
social_share_plus: ^0.0.1 copied to clipboard
A plugin supports variety of sharing contents and sharing platforms.
social_share #
A plugin supports variety of sharing contents and sharing platforms.
Introduction #
| Platforms | Content | OS |
|---|---|---|
| Text/Image/Music/Video/WebPage/File | Android/iOS | |
| Text/Image/WebView/File | Android/iOS | |
| Line | Text/Image/File | Android/iOS |
| Twiter | Text/Image/File | Android/iOS |
| Text/Image/File | Andorid/iOS | |
| SystemShare | --- | --- |
Preview #

! 
Usage #
reigster #
LaShareRegister register = LaShareRegister();
register.setupWechat(appId, secretKey, universalLink); //only need wechat
LaSharePlugin.registerPlatforms(register);
share #
1.construct share data**
LaShareParamsBean generateBean() {
return LaShareParamsBean(
contentType: LaShareContentTypes.webpage,
platform: LaSharePlatforms.whatsApp,
webUrl: webUrl,
title: title,
text: desc,
imageFilePath: imgFilePath,
);
}
2.start share
LaSharePlugin.share(
generateBean(),
notInstallCallBack,
successCallBack,
errorCallBack,
);
3. check App whether install
LaSharePlugin.isClientInstalled(LaSharePlatforms.whatsApp);
4. pop share dialog
LaSharePlugin.startShare(generateBean(),notInstallCallBack,successCallBack,errorCallBack);
Attention #
- iOS wechat image share use the SystemShare because wechat forbidden the image share for foreign.
- You should add some scheme config for accessing outer apps. Refer to example configuration.