[英]Flutter url_launcher ignores number sign(#) when call
我在我的應用程序中使用 url_launcher。 當我撥打包含數字符號(如“*123#”)的號碼時,它會忽略數字符號並只撥打 *123
你也應該使用 Uri.encodeComponent 來編碼#
onPressed: () {
String no = Uri.encodeComponent('*123#');
launch('tel:$no');
},
你必須使用Uri.encodeComponent
來#
你的字符串
onPressed: () {
String mycode = Uri.encodeComponent('*#06#');
launch('tel:$mycode');
},
因為需要對特殊字符進行編碼才能被您的設備使用
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.