小编Fah*_*rar的帖子

如何处置Flutter谷歌地图的控制器

我在我的项目中使用google_maps_flutter库。当我热重新加载地图或从另一个视图返回地图时,它会崩溃并显示消息:

Exception has occurred.
PlatformException (PlatformException(error, java.lang.IllegalStateException: Trying to create an already created platform view, view id: 0
    at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:85)
    at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:96)
Run Code Online (Sandbox Code Playgroud)

所以我试图处理地图及其控制器。我在本文中得到了一个要处理的代码片段, 所以我添加了这个代码片段:

@override
  void dispose() {
    _disposeController();
    super.dispose();
  }

  Future<void> _disposeController() async{
    final GoogleMapController controller = await _controller.future;
    //controller.dispose();
  }
Run Code Online (Sandbox Code Playgroud)

但取消注释最后一行会出现此错误:

 The method 'dispose' isn't defined for the class 'GoogleMapController'.
Try correcting the name to the name of an existing method, or defining a method named 'dispose'.
Run Code Online (Sandbox Code Playgroud)

那么我该如何处置控制器呢?

flutter google-maps-flutter

4
推荐指数
1
解决办法
1万
查看次数

Azure Devops ci 管道无法构建 asp.net 核心项目,因为它位于 github 存储库的子文件夹中

我必须构建一个带有角度前端的 asp.net 核心 spa 项目。所以我创建了两个文件夹,一个用于 asp.net 核心 API,另一个用于 angular 项目,并将其推送到 GitHub 上。我正在将项目与Azure Pipe Lines集成!GitHub 中的应用程序,以便我可以轻松地使用 Azure devops 执行 ci/cd。请注意,我只想在子文件夹中构建 API 项目。项目的 github 链接:https : //github.com/lazyfahim/tritronv2 和 azure yml 管道代码:https : //github.com/lazyfahim/tritronv2/blob/master/azure-pipelines.yml

构建终端中显示的错误消息是

    MSBUILD : error MSB1003: Specify a project or solution file. The 
    current working directory does not contain a project or solution file.
    ##[error]Bash exited with code '1'.
    ##[section]Finishing: dotnet build Release
Run Code Online (Sandbox Code Playgroud)

continuous-integration github azure-devops

2
推荐指数
1
解决办法
445
查看次数

亚马逊Aws正在收取免费套餐费用

我在亚马逊的教育中获得了75美元和1年的免费等级用途.它被称为amazon aws学生初学者包.我在免费套餐中只创建了一个ec2实例和一个rds.但亚马逊每天收费75美元.即使我不能发出支持票.因为学生帐户无法创建支持服务单. https://aws.amazon.com/premiumsupport/knowledge-center/educate-starter-account/

amazon-ec2 amazon-web-services amazon-rds

-3
推荐指数
1
解决办法
188
查看次数