Bläddra i källkod

1.优化多图片分享

tags/0.0.5+1
“yanghuaxuan” 3 år sedan
förälder
incheckning
12023c38f9
2 ändrade filer med 16 tillägg och 1 borttagningar
  1. +1
    -1
      example/ios/Runner/Info.plist
  2. +15
    -0
      lib/widgets/share/share_alert_select.dart

+ 1
- 1
example/ios/Runner/Info.plist Visa fil

@@ -77,7 +77,7 @@
<string>weixin</string>
<key>CFBundleURLSchemes</key>
<array>
<string>wx</string>
<string>wx598aaef252cd78e4</string>
</array>
</dict>
<dict>


+ 15
- 0
lib/widgets/share/share_alert_select.dart Visa fil

@@ -376,6 +376,18 @@ class _ShareAlertContentState extends State<_ShareAlertContent> {
return;
}

int count = 0;
if (_shareDataModel.poster != null) {
count++;
}
count += (_shareDataModel?.image?.length ?? 0);
// 多图分享
if (count > 1) {
_shareMultipleImages(item.type);
return;
}


if (item.type == 'wx') {
_shareByMob(ShareSDKPlatforms.wechatSession);
} else if (item.type == 'pyq') {
@@ -403,11 +415,14 @@ class _ShareAlertContentState extends State<_ShareAlertContent> {
return;
}


Loading.show(context);
Timer(Duration(milliseconds: 2000), () {
Loading.dismiss();
});



SSDKMap params;
if (_shareDataModel.poster != null) {
String path = await _savePoster();


Laddar…
Avbryt
Spara