Home > OS >  flutter show modal bottom sheet to share application
flutter show modal bottom sheet to share application

Time:05-09

How can i show this kind of modal bottom sheet ? that contains list of applications and the user can share the application after choosing one of the list ? is there a package to implement it ?

enter image description here

CodePudding user response:

use This library flutter_share

CodePudding user response:

You can use the following plugin to achieve this. Share Plus

With full example here Example

The others mentioned like flutter_share and share are deprecated.

CodePudding user response:

You can use SHARE_PLUS package for share as below:

Future<void> _handleSharePressed() async {
final box = context.findRenderObject() as RenderBox?;
String myList = 'MY_LIST';

await Share.share(myList,
        subject: 'YOUR_SUBJECT',
        sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size);

 }
  • Related