AMap for Flutter

pub package

A Flutter plugin that provides a AMapFlutter widget.

Android iOS
Support SDK 26+ iOS 12+


To use this plugin, add amap_flutter as a dependency in your pubspec.yaml file.

Getting Started

Log in to the AMap Services console to get an API key at;

  • Go to AMap Service Console, expand the Application Management menu and select My Apps;
  • Click Create Application on the right, if you have already created an application, you can directly select Add Key;
  • Select platform, enter key name, and enter package name in th panel.


Android and iOS

You have to set api key and agree privacy before build AMapFlutter by calling AMapFlutter.setApiKey() and AMapFlutter.agreePrivacy().

Web platform

  • Add script element in index.html in example app to set version, apiKey, and plugins.
<script type="text/javascript" 

Sample Usage

  • You can now add a AMapFlutter widget to your widget tree. The AMapFlutter widget should be used within a widget with a bounded size. Using it in an unbounded widget will cause the application to throw a Flutter exception.
class Demo extends StatefulWidget {
  const Demo({Key? key}) : super(key: key);

  static const title = 'amap_flutter_example';

  State<Demo> createState() => _DemoState();

class _DemoState extends State<Demo> {
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(Demo.title),
      body: AMapFlutter(),

See the example directory for a complete sample app.