【发布时间】:2020-04-18 12:19:29
【问题描述】:
我正在尝试在对话框中显示 Google 地图,第一次按预期弹出,但第二次抛出异常:StateError(错误状态:未来已完成)。
Completer<GoogleMapController> _controller = Completer();
_displayDialog(){
Alert(
context: context,
style: alertStyle,
title: "Here are your results:",
content: Column(
children: <Widget>[
Container(
width: 200.0,
height: 200.0,
child: GoogleMap(
//mapType: MapType.hybrid,
initialCameraPosition: _kGooglePlex,
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller); //throws here in this line
},
),
),
],
),
Here is a gif to summarize whats happening
我正在使用 rflutter_alert: ^1.0.3 作为对话框, google_maps_flutter: ^0.5.21+15 用于地图。
提前致谢!
【问题讨论】:
标签: google-maps exception flutter dart