flutter_share_plus
Flutter plugin to share text and images and many more.
Getting Started
Add into your pubspec.yaml
===========================
flutter_share_plus:
Share single text
=============================================================
Future<void> share_text(String message) async {
await _channel.invokeMethod('share_text',<String, String>{
'message':message
});
}
ElevatedButton(
onPressed: (){
share_text("message111");
},
child: Text("Click me to share single text")
),
Share multiple text
=============================================================
Future<void> share_multiline_text(String title, String description) async {
await _channel.invokeMethod('share_multiline_text',<String, String>{
'title':title,'description':description
});
}
ElevatedButton(
onPressed: (){
share_multiline_text("title111","description111");
},
child: Text("Click me to share multiple text")
)