小编Vai*_*hak的帖子

如何在flutter中从谷歌地图中删除特定标记?

我是维巴夫·帕塔克。我正在开发一个 Flutter 应用程序,在该应用程序中,我根据 firestore 数据库中的数据更改在应用程序内添加标记,并且我想使用其标记 id 从地图中删除先前的标记,但我不明白该怎么做。我看过很多 Youtube 视频和博客,但由于 google 地图 flutter 插件中的 API 更改,我不知道这一点。对于您的信息,我想告诉您,我正在使用最新版本的 google_maps flutter 插件。

我的标记代码:

showLiveLocation(LatLng latLng) {
_markers.add(
  Marker(
    markerId: MarkerId(latLng.toString()),
    position: latLng,
    draggable: false,
    infoWindow: InfoWindow(
        title: "Live Order Location",
        snippet: "Dear customer your order is live at this place."),
    icon: liveLocation,
    visible: true,
  ),
);
Run Code Online (Sandbox Code Playgroud)

}

感谢大家的帮助。

github:github@vkpdeveloper

flutter

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

RadioListTile 未正确选择

我是维巴夫·帕塔克。我在使用 RadioListTile 时遇到问题。我创建了两个 RadioListTile,其中在 onChnaged 属性上调用一个函数,其中在调用 setState 中将 selectedRadio 变量的值设置为我从函数中获得的值,并且它更改了变量值,但不反映对 Ui 的更改意味着它确实如此不选择按下的单选按钮。

\n\n

我的代码在这里:

\n\n
showPaymentOptions() {\nshowModalBottomSheet(\n    shape: RoundedRectangleBorder(\n        borderRadius: BorderRadius.only(\n            topLeft: Radius.circular(25.0),\n            topRight: Radius.circular(25.0))),\n    elevation: 8.0,\n    context: context,\n    builder: (context) {\n      return Padding(\n        padding: const EdgeInsets.all(15.0),\n        child: Container(\n            height: 240,\n            child: Column(\n              crossAxisAlignment: CrossAxisAlignment.stretch,\n              children: <Widget>[\n                Column(\n                  children: <Widget>[\n                    Align(\n                      alignment: Alignment.topLeft,\n                      child: Text(\n                        "Select Payment Method : ",\n                        style: TextStyle(\n                            color: Colors.black54,\n                            fontSize: 16.0,\n                            fontWeight: FontWeight.bold),\n                      ),\n                    ),\n                    SizedBox(\n                      height: 7.0,\n                    ),\n                    Card(\n                      elevation: 8.0,\n                      child: Padding(\n                        padding: …
Run Code Online (Sandbox Code Playgroud)

flutter

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

标签 统计

flutter ×2