Skip to content
pubscout

amap_flutter_location

3.0.0, released 5 years ago by an unverified publisher

Flutter plugin for AMap Location SDK providing geolocation services on Android and iOS

$ flutter pub add amap_flutter_location

What it does

It allows Flutter applications to obtain location data using the AMap (高德) Location SDK. It supports configuring parameters like accuracy, interval, and address details, and exposes location changes via a Stream.

AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need geolocation services specifically tailored or optimized for regions using AMap data.
  • Your application requires continuous or single-shot location updates on Android and iOS.

Skip it when

  • You need a general-purpose global mapping or geolocation solution without regional vendor lock-in.
  • You want a declarative widget-based location wrapper rather than an imperative plugin controller.

Strengths

  • Provides direct integration with AMap Location SDK for Android and iOS.
  • Supports fine-grained location options such as address lookup, intervals, and iOS 14 accuracy authorizations.

Weaknesses

  • Requires manual configuration of keys on the AMap developer platform for both Android and iOS.
  • Requires compliance setup for privacy policies as mandated by AMap SDK.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
0

Requires registering for Android and iOS keys on the AMap Developer Portal, configuring platform-specific settings, and handling privacy compliance methods (updatePrivacyShow, updatePrivacyAgree) before calling location APIs.

import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:amap_flutter_location/amap_location_option.dart';

final AMapFlutterLocation _locationPlugin = AMapFlutterLocation();

void start() {
  _locationPlugin.setLocationOption(AMapLocationOption()..onceLocation = false);
  _locationPlugin.onLocationChanged().listen((Map<String, Object> result) {
    print(result);
  });
  _locationPlugin.startLocation();
}

Alternatives

Packages that do the same job and could replace amap_flutter_location.

  • geolocator

    A generic, cross-platform geolocation plugin that does not depend on regional map providers like AMap.