{"id":23438692,"url":"https://github.com/yohom/amap_search_fluttify","last_synced_at":"2025-10-25T22:10:01.440Z","repository":{"id":56825882,"uuid":"211621494","full_name":"yohom/amap_search_fluttify","owner":"yohom","description":"高德地图 搜索组件 Flutter插件","archived":false,"fork":false,"pushed_at":"2022-10-03T03:31:29.000Z","size":93040,"stargazers_count":63,"open_issues_count":4,"forks_count":32,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T23:11:17.640Z","etag":null,"topics":["android","flutter","flutter-plugin","fluttify","ios"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yohom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-29T07:22:26.000Z","updated_at":"2024-09-07T13:46:40.000Z","dependencies_parsed_at":"2023-01-19T02:31:03.109Z","dependency_job_id":null,"html_url":"https://github.com/yohom/amap_search_fluttify","commit_stats":null,"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yohom%2Famap_search_fluttify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yohom%2Famap_search_fluttify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yohom%2Famap_search_fluttify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yohom%2Famap_search_fluttify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yohom","download_url":"https://codeload.github.com/yohom/amap_search_fluttify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675457,"owners_count":21143766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","flutter","flutter-plugin","fluttify","ios"],"created_at":"2024-12-23T14:51:58.134Z","updated_at":"2025-10-25T22:09:56.417Z","avatar_url":"https://github.com/yohom.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 高德地图 `搜索`组件\n\n[![pub package](https://img.shields.io/pub/v/amap_search_fluttify.svg)](https://pub.Flutter-io.cn/packages/amap_search_fluttify)\n![CI](https://github.com/fluttify-project/amap_search_fluttify/workflows/CI/badge.svg)\n\n高德地图`搜索`组件. Dart接口基于[Fluttify](https://github.com/yohom/fluttify-core-example)引擎生成. [接口文档](https://pub.flutter-io.cn/documentation/amap_search_fluttify/latest/).\n\n## DEMO 与 社区\n\n|                                                                                                              Demo                                                                                                              |                                                                     QQ群                                                                      |\n|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------:|\n| 扫描二维码 \u003cbr\u003e 或者 \u003cbr\u003e [点击下载](https://github.com/fluttify-project/amap_search_fluttify/blob/master/example/build/app/outputs/apk/release/app-release.apk?raw=true) \u003c/br\u003e \u003cimg src=\"assets/amap_map_fluttify_apk.png\" height=\"300\"\u003e | 加入QQ群讨论 \u003cbr/\u003e \u003cimg src=\"https://github.com/fluttify-project/fluttify-core-example/blob/develop/other/QQ%E7%BE%A4.png?raw=true\" height=\"300\"\u003e |\n\n安装: \n```yaml\ndependencies:\n  flutter:\n    sdk: flutter\n  amap_search_fluttify: ^x.x.x\n```\n\n导入:\n```dart\nimport 'package:amap_search_fluttify/amap_search_fluttify.dart';\n```\n\n使用:\n```dart\n/// !注意: 只要是返回Future的方法, 一律使用`await`修饰, 确保当前方法执行完成后再执行下一行, 在不能使用`await`修饰的环境下, 在`then`方法中执行下一步.\n/// 初始化 iOS在init方法中设置, android需要去AndroidManifest.xml里去设置, 详见https://lbs.amap.com/api/android-sdk/gettingstarted\nawait AmapCore.init('ios key');\n\n/// !重要: 通过AmapSearchDisposeMixin释放native端的对象, 否则native端会内存泄漏!\nclass _KeywordPoiScreenState extends State\u003cKeywordPoiScreen\u003e with AmapSearchDisposeMixin {}\n\n/// 搜索关键字poi\nfinal poiList = await AmapSearch.instance.searchKeyword(\n                _keywordController.text,\n                city: _cityController.text,\n              );\n\n/// 搜索周边poi\nfinal poiList = await AmapSearch.instance.searchAround(\n                LatLng(\n                  double.tryParse(_latController.text) ?? 29.08,\n                  double.tryParse(_lngController.text) ?? 119.65,\n                ),\n                keyword: _keywordController.text,\n              );\n\n/// 输入提示\nfinal inputTipList = await AmapSearch.instance.fetchInputTips(\n                _keywordController.text,\n                city: _cityController.text,\n              );\n\n/// 地理编码（地址转坐标）\nfinal geocodeList = await AmapSearch.instance.searchGeocode(\n                _keywordController.text,\n                city: _cityController.text,\n              );\n\n/// 逆地理编码（坐标转地址）\nfinal reGeocodeList = await AmapSearch.instance.searchReGeocode(\n                LatLng(\n                  double.parse(_latController.text),\n                  double.parse(_lngController.text),\n                ),\n                radius: 200.0,\n              );\n\n/// 获取行政区划数据\nfinal district = await AmapSearch.instance.searchDistrict(_keywordController.text);\n\n/// 获取天气数据\nfinal district = await AmapSearch.instance.searchDistrict(_keywordController.text);\n\n/// 公交路径规划(未完成)\nfinal routeResult = await AmapSearch.instance.searchBusRoute(\n                from: LatLng(\n                  double.parse(_fromLatController.text),\n                  double.parse(_fromLngController.text),\n                ),\n                to: LatLng(\n                  double.parse(_toLatController.text),\n                  double.parse(_toLngController.text),\n                ),\n                city: '杭州',\n              );\n\n/// 驾车路径规划\nfinal routeResult = await AmapSearch.instance.searchDriveRoute(\n                from: LatLng(\n                  double.parse(_fromLatController.text),\n                  double.parse(_fromLngController.text),\n                ),\n                to: LatLng(\n                  double.parse(_toLatController.text),\n                  double.parse(_toLngController.text),\n                ),\n              );\n\n/// 骑行路径规划\nfinal routeResult = await AmapSearch.instance.searchRideRoute(\n                from: LatLng(\n                  double.parse(_fromLatController.text),\n                  double.parse(_fromLngController.text),\n                ),\n                to: LatLng(\n                  double.parse(_toLatController.text),\n                  double.parse(_toLngController.text),\n                ),\n              );\n\n/// 步行路径规划\nfinal routeResult = await AmapSearch.instance.searchWalkRoute(\n                from: LatLng(\n                  double.parse(_fromLatController.text),\n                  double.parse(_fromLngController.text),\n                ),\n                to: LatLng(\n                  double.parse(_toLatController.text),\n                  double.parse(_toLngController.text),\n                ),\n              );\n```\n\n## LICENSE\n\u003e Copyright 2020 yohom\n\u003e   \n\u003e Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\u003e\n\u003e    http://www.apache.org/licenses/LICENSE-2.0\n\u003e \n\u003e  Unless required by applicable law or agreed to in writing, software\n\u003e  distributed under the License is distributed on an \"AS IS\" BASIS,\n\u003e  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\u003e  See the License for the specific language governing permissions and\n\u003e  limitations under the License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyohom%2Famap_search_fluttify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyohom%2Famap_search_fluttify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyohom%2Famap_search_fluttify/lists"}