【发布时间】:2020-03-16 09:50:33
【问题描述】:
我的电话呼叫方法不起作用。当我直接给我的手机号码时,它就可以工作了。但是,当我从我的数据库中通过时,它无法正常工作......它总是拨打 662453......
这是我的代码:
void _launchCaller(String mobile) async {
//debugPrint(mobile);
//UrlLauncher.launch('tel:${contact.phone}');
const url = "tel:mobile";
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
【问题讨论】:
标签: flutter