搜索插件、代码仓与 APP 分类

插件详情v0.22.0

amap_location_fluttify

一个由 `Fluttify` 提供支持的 `Amap` 位置组件,该编译器可为原生 SDK 生成 Dart 绑定。

AndroidiOS
近 30 天下载
348
喜欢数
17
Pub 分数
105

安装插件

flutter pub add amap_location_fluttify

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 包,使用高德的原生 SDK 提供位置服务,由 Fluttify 工具驱动——该工具为原生库生成 Dart 绑定。它通过无缝的 Dart 接口,使 Android 和 iOS 上都能访问高精度地理定位功能。适用于需要强大地图位置跟踪功能的应用程序,例如导航、配送服务或位置感知工具。该包利用原生性能的同时保持跨平台兼容性。

适合场景

  • 实时位置跟踪
  • 基于地图的应用程序
  • 配送和物流应用
  • 位置感知服务
  • 地理围栏实现

主要特点

  • 原生高德 SDK 集成
  • 跨平台支持(Android 和 iOS)
  • 通过 Fluttify 的自动 Dart 绑定
  • 高精度位置数据
  • 使用 Flutter pub 轻松设置

适合对象

  • 使用高德地图的开发者
  • 需要精确地理位置的应用程序
  • 需要原生 SDK 访问权限的项目
  • 希望代码量最少的Flutter团队
  • 中国拥有高德依赖的移动应用

使用建议

  • 需要 Amap SDK 设置和 API 密钥
  • 仅限 Android 和 iOS 平台
  • 取决于 Fluttify 的稳定性
  • 可能需要在清单文件/info.plist中添加额外权限
  • 由于包含原生 SDK,潜在大小增加

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Logo

高德 定位组件

pub package

Dart接口基于fluttify引擎生成. dartdoc接口文档.

DEMO 与 社区

Demo QQ群
扫描二维码
或者
点击下载
加入QQ群讨论

安装:

dependencies:
  flutter:
    sdk: flutter
  amap_location_fluttify: ^x.x.x

导入:

import 'package:amap_location_fluttify/amap_location_fluttify.dart';

使用:

/// !注意: 只要是返回Future的方法, 一律使用`await`修饰, 确保当前方法执行完成后再执行下一行, 在不能使用`await`修饰的环境下, 在`then`方法中执行下一步.
/// 初始化 iOS在init方法中设置, android需要去AndroidManifest.xml里去设置, 详见 https://lbs.amap.com/api/android-sdk/gettingstarted
await AmapCore.init('ios key');

// 单次定位
if (await requestPermission()) {
  final location = await AmapLocation.fetchLocation();
  setState(() => _location = location);
}

// 连续定位
if (await requestPermission()) {
  AmapLocation.listenLocation()
    .listen((location) => setState(() => _location = location));
}

LICENSE

Copyright 2020 yohom

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

所属分类

依赖

依赖清单 3 项

  • amap_core_fluttify^0.17.0
  • core_location_fluttify^0.7.1
  • foundation_fluttify^0.13.0+1

源码仓库

使用此插件的项目

暂无相关数据。