Flutter url_launcher 在调用时忽略数字符号#

问题描述

我在我的应用中使用 url_launcher。当我拨打包含“*123#”等数字符号的号码时,它会忽略数字符号而只拨打 *123

解决方法

您也应该使用 Uri.encodeComponent 对 # 进行编码

onPressed: () {
        String no = Uri.encodeComponent('*123#');
        launch('tel:$no');
      },