share static method
method to share with system ui
It uses the ACTION_SEND Intent on Android and UIActivityViewController
on iOS.
list
can be text or path list
type
"text", "image", "audio", "video" or "file"
sharePositionOrigin
only supports iPad os
sharePanelTitle
only supports android (some devices may not support)
subject
Intent.EXTRA_SUBJECT on Android and "subject" on iOS.
extraText
only supports android for Intent.EXTRA_TEXT when sharing image or file.
Implementation
static Future<void> share(String text, String type,
{Rect? sharePositionOrigin,
String? sharePanelTitle,
String subject = "",
String extraText = ""}) {
assert(text.isNotEmpty);
List<String> list = [text];
return _shareInner(
list,
type,
sharePositionOrigin: sharePositionOrigin,
sharePanelTitle: sharePanelTitle,
subject: subject,
extraTexts: [extraText],
);
}