range_map 0.2.1

  • README.md
  • Installing
  • Versions
  • 45


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.

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


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


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]
74 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: Flutter, web, other

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


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

  • 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.2
Dev dependencies
test >=0.12.0 <0.13.0