Skip to content

Commit

Permalink
add option subject for muti share
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouteng0217 committed Apr 2, 2020
1 parent 8f546a6 commit 5891d9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class _MyAppState extends State<MyApp> {
await _writeByteToImageFile(await asset.getByteData(quality: 30));
imageList.add(path);
}
ShareExtend.shareMultiple(imageList, "image");
ShareExtend.shareMultiple(imageList, "image", subject: "share muti image");
}

Future<String> _writeByteToImageFile(ByteData byteData) async {
Expand Down
10 changes: 8 additions & 2 deletions lib/share_extend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ class ShareExtend {
static const MethodChannel _channel =
const MethodChannel('com.zt.shareextend/share_extend');

///
/// [sharePositionOrigin] only supports ios
///
static Future<void> shareMultiple(List<String> 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<void> share(String text, String type,
Expand Down

0 comments on commit 5891d9d

Please sign in to comment.