eft_flutter_amap 0.0.1

eft_flutter_amap #

A flutter plugin to use amap.

Getting Started #

Add this to your package's pubspec.yaml file:

  eft_flutter_amap: "^0.0.1"

Getting Started #

  • Android

  • Add following permissions to your AndroidManifest.xml

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"></uses-permission>
    <uses-permission android:name="android.permission.BLUETOOTH"></uses-permission>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"></uses-permission>

  • Add following code between
                android:value="[您在高德地图后台申请的Android Key]"/>
            <service android:name="com.amap.api.location.APSService"></service>
            <activity android:name="com.amap.api.navi.AmapRouteActivity"
                android:configChanges="orientation|keyboardHidden|screenSize" />
  • ios

  • Add following permissions in info.plist


How to use #

import 'package:eft_flutter_amap/eft_flutter_amap.dart';
await EftFlutterAmap.initKey("[您在高德地图后台申请的IOS Key]"); //初始化IOS key
await EftFlutterAmap.initLocation(onceFlag); //请求定位,onceFlag:true单次,false持续
await EftFlutterAmap.stopLocation(); //停止定位
await EftFlutterAmap.destoryLocation(); //销毁定位
await EftFlutterAmap.showMap("[地点名称]","[描述]",[坐标]); //显示地图
await EftFlutterAmap.showNavMap(
      startLocation: [始点坐标],
      endLocation: [终点坐标],
      startAddress: "[始点]",
      endAddress: "[终点]"
    ); //导航
EftFlutterAmap.setMethodCallHandler((MethodCall call){

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

0.0.1 #

A flutter plugin for amap 1.get location 2.show map view 3.show navigate view

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  eft_flutter_amap: ^0.0.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:eft_flutter_amap/eft_flutter_amap.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Format lib/eft_flutter_amap.dart.

Run flutter format to format lib/eft_flutter_amap.dart.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and eft_flutter_amap.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies