【问题标题】:Flutter Web send pdf file to a WhatsApp contact using URL LauncherFlutter Web 使用 URL Launcher 将 pdf 文件发送给 WhatsApp 联系人
【发布时间】:2021-12-28 09:07:37
【问题描述】:

我已经实现了一个 void 函数来使用 URL Launcher 在 Flutter Web 中启动 WhatsApp。但是,我的目标是将 pdf 文件传递​​给 WhatsApp 联系人,而不是文本 HelloWorld。有谁知道我是怎么做的,我应该将 pdf 文件转换为 Uri 然后解析为字符串吗?

 void _openWhatsApp(String phoneNumberControllerText) async {
    String phoneNumber = phoneNumberControllerText;
    var url = 'https://wa.me/${phoneNumber}?text=HelloWorld';
    await launch(url);
  }

【问题讨论】:

    标签: android flutter whatsapp url-launcher


    【解决方案1】:

    您想要的是共享 PDF, 看看这个包share_plus

    【讨论】:

    • 目前尚不确定 share plus 是否有帮助
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-14
    • 2013-09-24
    • 1970-01-01
    • 2022-06-14
    相关资源
    最近更新 更多