share_options 1.0.3 share_options: ^1.0.3 copied to clipboard
A Flutter plugin for getting share options and share text & multiple file over them.
share_options #
A Flutter plugin for getting share options and share text / files over them .
Let's Discover It #
Get sharing options which can receive texts only :-
Future<List<ShareOption>> get getTextShareOptions async => await ShareOptions.getTextShareOptions("text",subject: "subject");
Get sharing options which can receive files :-
Future<List<ShareOption>> get getFileShareOptions async =>
await ShareOptions.getFilesShareOptions(['path1', 'path2'], text: 'text',subject: 'subject');
Finally for share :-
void share()async{
// this method is declared above
final shareOptions =await getFileShareOptions;
await shareOptions[0].share();
}
Maybe you are wondering now :- #
Why you made shared content passes when getting share options ??
- to get share options which support and compatible with shared content; some apps maybe doesn't support file sharing , some formats of files or multiple files share and so on .