range_map 0.2.1

  • README.md
  • Installing
  • Versions
  • 37


Build Status

A mapping from disjoint nonempty ranges to values.


A simple usage example:

final range = new Range<int>(3, 5); // 3 inclusive, 5 exclusive
final rangeMap = new TreeRangeMap<int, String>();

rangeMap[range] = 'foo';

print('${rangeMap.containsKey(3)}'); // true
print('${rangeMap[3]}'); // 'foo'

print('${rangeMap.containsKey(4)}'); // true
print('${rangeMap[4]}'); // 'foo'

print('${rangeMap.containsKey(5)}'); // false
print('${rangeMap[5]}'); // null

print('${rangeMap.containsKey(6)}'); // false
print('${rangeMap[6]}'); // null

Features and bugs

Please file feature requests and bugs at the issue tracker.



  • Turn on strong mode and fix warnings and errors. Use
  • Comparable.compareTo instead of > and < operators. range_map now supports any Comparable key without > and < operators defined.


  • Add RangeMap.unmodifiable constructor which returns an UnmodifiableRangeMapView instance.


  • Initial version.

Use this package as a library

1. Depend on it

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

  range_map: "^0.2.1"

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:range_map/range_map.dart';
Version Uploaded Documentation Archive
0.2.1 Oct 31, 2016 Go to the documentation of range_map 0.2.1 Download range_map 0.2.1 archive
0.2.0 Oct 12, 2016 Go to the documentation of range_map 0.2.0 Download range_map 0.2.0 archive
0.1.0 Mar 30, 2016 Go to the documentation of range_map 0.1.0 Download range_map 0.1.0 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]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
36 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:range_map/range_map.dart.


  • Package is getting outdated.

    The package was released 85 weeks ago.

  • 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.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 hint.

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

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
quiver_hashcode >=1.0.0 <2.0.0 1.0.0
quiver_iterables >=1.0.0 <2.0.0 1.0.1
Transitive dependencies
meta 1.1.5
Dev dependencies
test >=0.12.0 <0.13.0