gpt4 book ai didi

flutter - 在 url_launcher mailto 方案中,空格被转换为 + flutter

转载 作者:行者123 更新时间:2023-12-02 18:46:51 25 4
gpt4 key购买 nike

我使用 url_launcher 包在 flutter 中集成了一个邮件方案。主题和正文作为查询参数给出。

 final Uri _emailLaunchUri = Uri(
scheme: 'mailto',
path: 'mail@qapp.how',
queryParameters: {
'body':
'this is sample text'
}
);

这将在邮件中以 this+is+sample+text 的形式提供文本。

最佳答案

使用查询代替查询参数。

final Uri _emailLaunchUri = Uri(
scheme: 'mailto',
path: 'mail@qapp.how',
query:
'body=this is sample text',
);

关于flutter - 在 url_launcher mailto 方案中,空格被转换为 + flutter ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67317915/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com