From 5891d9d2a1a0653c55583a0a897ed9952d20abea Mon Sep 17 00:00:00 2001 From: zhouteng Date: Thu, 2 Apr 2020 19:24:55 +0800 Subject: [PATCH] add option subject for muti share --- example/lib/main.dart | 2 +- lib/share_extend.dart | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 31db118..fa3b464 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -92,7 +92,7 @@ class _MyAppState extends State { await _writeByteToImageFile(await asset.getByteData(quality: 30)); imageList.add(path); } - ShareExtend.shareMultiple(imageList, "image"); + ShareExtend.shareMultiple(imageList, "image", subject: "share muti image"); } Future _writeByteToImageFile(ByteData byteData) async { diff --git a/lib/share_extend.dart b/lib/share_extend.dart index eeabed5..d877af5 100644 --- a/lib/share_extend.dart +++ b/lib/share_extend.dart @@ -14,10 +14,16 @@ class ShareExtend { static const MethodChannel _channel = const MethodChannel('com.zt.shareextend/share_extend'); + /// + /// [sharePositionOrigin] only supports ios + /// static Future shareMultiple(List list, String type, - {Rect sharePositionOrigin}) { + {Rect sharePositionOrigin, String sharePanelTitle, String subject}) { assert(list != null && list.isNotEmpty); - return _shareInner(list, type, sharePositionOrigin: sharePositionOrigin); + return _shareInner(list, type, + sharePositionOrigin: sharePositionOrigin, + subject: subject, + sharePanelTitle: sharePanelTitle); } static Future share(String text, String type,