opencage_geocoder 0.0.5

  • Installing
  • Versions
  • 49

OpenCage Data Geocoding Library for Dart

A Dart package that provides geocoding and reverse geocoding of locations using the OpenCage Geocoder geocoder.


A simple usage example:

var geocoder = new Geocoder("YOUR_KEY");
var response = await geocoder.geocode("rennes");
// Or
response = await geocoder.reverseGeocode(2.3514992, 48.8566101);

You can also add one of the named parameter (language, countryCode, bounds, abbrv, limit, minConfidence, noAnnotations, noDedupe, noRecord, addRequest) :

var response = await geocoder.geocode("rennes", limit: 2, countryCode: "fr");


Contributions are welcome! If you find a bug please report it and if you want a feature please report it.

If you want to contribute code please file an issue and create a branch off of the current dev branch and file a pull request.


MIT © Aloïs Deniel



  • Initial version

Use this package as a library

1. Depend on it

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

  opencage_geocoder: "^0.0.5"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

      import 'package:opencage_geocoder/opencage_geocoder.dart';
Version Uploaded Documentation Archive
0.0.5 Apr 3, 2018 Go to the documentation of opencage_geocoder 0.0.5 Download opencage_geocoder 0.0.5 archive


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

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
96 / 100
Reflects how tidy and up-to-date the package is. [more]
99 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, other

Primary library: package:opencage_geocoder/opencage_geocoder.dart with components: io.


  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 23 hints.

    Run dartfmt to format lib/src/geocoder.dart.

    Run dartfmt to format lib/src/model.dart.

    Similar analysis of the following files failed:

    • lib/src/model.g.dart (hint)
  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use opencage_geocoder.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.3 <2.0.0
json_annotation ^0.2.2 0.2.8
Dev dependencies
build_runner ^0.6.1
json_serializable ^0.3.0
test ^0.12.0