扑来显示模态底面以共享应用程序

发布于 2025-01-27 03:16:47 字数 228 浏览 3 评论 0原文

如何显示这种模态底部纸?其中包含应用程序列表,并且在选择列表之一之后,用户可以共享应用程序?是否有可以实施的软件包?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

千秋岁 2025-02-03 03:16:47

使用此库
flutter_share

use This library
flutter_share

只有影子陪我不离不弃 2025-02-03 03:16:47

您可以使用以下插件来实现此目标。


示例

其他提到的人像 flutter_share 共享已折旧。

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.

酷到爆炸 2025-02-03 03:16:47

您可以使用 share_plus 用于共享的软件包如下:

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);

 }

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);

 }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文