Pārlūkot izejas kodu

1.优化多图片分享

tags/0.0.5+1
“yanghuaxuan” pirms 3 gadiem
vecāks
revīzija
12023c38f9
2 mainītis faili ar 16 papildinājumiem un 1 dzēšanām
  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 Parādīt failu

@@ -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 Parādīt failu

@@ -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();


Notiek ielāde…
Atcelt
Saglabāt