Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter URL_启动器在发布模式下不工作_Flutter_Dart - Fatal编程技术网

Flutter URL_启动器在发布模式下不工作

Flutter URL_启动器在发布模式下不工作,flutter,dart,Flutter,Dart,我不知道我在URL_启动器上的函数发生了什么。在调试模式下,一切正常,但在发布版本中它不工作。当我按下图标时,什么也没发生。当我运行flatter run--release时,我可以看到它给出了一个错误: 使用“canLaunch”: [错误:flatter/lib/ui/ui\u dart\u state.cc(166)]未处理的异常:MissingPluginException(在通道插件上找不到方法canLaunch的实现。flatter.io/url 没有“canLaunch”: [

我不知道我在URL_启动器上的函数发生了什么。在调试模式下,一切正常,但在发布版本中它不工作。当我按下图标时,什么也没发生。当我运行
flatter run--release
时,我可以看到它给出了一个错误:

  • 使用“canLaunch”:
    [错误:flatter/lib/ui/ui\u dart\u state.cc(166)]未处理的异常:MissingPluginException(在通道插件上找不到方法canLaunch的实现。flatter.io/url

  • 没有“canLaunch”:
    [错误:flatter/lib/ui/ui\u dart\u state.cc(166)]未处理的异常:MissingPluginException(在channel plugins.flatter.io/url\u launcher上未找到方法启动的实现)

给出此错误的代码示例:

onPressed: (){
                launch("tel:${modelComercio.telefone}");
              },

您是否尝试过颤振清理然后再次运行?是的。在调试模式下正常工作。在发布模式下不工作…=/这里有相同的问题。您是否修复了它?@AlanSoares Brother???您是否尝试过颤振清理然后再次运行?是的。在调试模式下正常工作。在发布模式下不工作…=/这里有相同的问题。您修复了吗是不是?@AlanSoares兄弟???