Flutter 如何防止应用程序在使用URL启动器后冻结
我需要url_启动器的帮助。我正在使用它的一个特性——makePhoneCall。在我使用应用程序后,它会冻结该应用程序并返回到该应用程序。 它表明 D/MALI(30528):gles\U状态设置错误\U内部:76:[马里]gles错误信息:执行失败 D/MALI(30528):格尔斯州设置错误内部:75:[马里]格尔斯ctx:0x732A000C008,错误代码:0x505Flutter 如何防止应用程序在使用URL启动器后冻结,flutter,Flutter,我需要url_启动器的帮助。我正在使用它的一个特性——makePhoneCall。在我使用应用程序后,它会冻结该应用程序并返回到该应用程序。 它表明 D/MALI(30528):gles\U状态设置错误\U内部:76:[马里]gles错误信息:执行失败 D/MALI(30528):格尔斯州设置错误内部:75:[马里]格尔斯ctx:0x732A000C008,错误代码:0x505 String _phone = '02xxxxxxxx'; Future<void>_makePho
String _phone = '02xxxxxxxx';
Future<void>_makePhoneCall(String url) async {
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
CircularCard(
color: Colors.blueAccent,
onPressed: (){
setState(() {
_makePhoneCall('tel:$_phone');
});
},
text: 'Call to Order',
iconData: FontAwesome.phone,
iconColor: Colors.white,
),
String_phone='02xxxxxxxx';
Future\u makePhoneCall(字符串url)异步{
如果(等待canLaunch(url)){
等待发射(url);
}否则{
抛出“无法启动$url”;
}
}
循环卡(
颜色:Colors.blueAccent,
已按下:(){
设置状态(){
_makePhoneCall('tel:$_phone');
});
},
文本:“订单调用”,
Iconda:Fontsome.phone,
iconColor:Colors.white,
),
我认为,随着它的回归,问题在未来会出现`
String _phone = '02xxxxxxxx';
_makePhoneCall(String url) async {
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
CircularCard(
color: Colors.blueAccent,
onPressed: (){
setState(() {
_makePhoneCall('tel:$_phone');
});
},
text: 'Call to Order',
iconData: FontAwesome.phone,
iconColor: Colors.white,
),
`