搜尋套件、儲存庫與 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

原始碼儲存庫

使用此套件的專案

暫無相關資料。