tuple 1.0.1

  • README.md
  • Installing
  • Versions
  • 87

Tuple data structure

  • [Tuple2], [Tuple3]...

Build Status Coverage Status

Usage example

const t = const Tuple2<String, int>('a', 10);

print(t.item1); // prints 'a'
print(t.item2); // prints '10'
final t1 = const Tuple2<String, int>('a', 10);
final t2 = t1.withItem1('c');
// t2 is a new [Tuple2] object with item1 is 'c' and item2 is 10.


  • Fix all strong-mode warnings and errors.


  • Remove _hash function and use quiver_hashcode package instead.


  • Add fromList factory constructor.
  • Add Tuple6 and Tuple7 classes.


  • Add toList method.


  • Rename PersistentTuple classes to Tuple; remove Tuple classes.
  • Rename each iN item to itemN.
  • Rename setIN to withItemN.


  • Fix a bug in == operator of PersistentTuple classes.


  • Add operator == and hashCode to classes, so that tuples may be used as keys in hashes.


  • Initial release.

Use this package as a library

1. Depend on it

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

  tuple: "^1.0.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:tuple/tuple.dart';
Version Uploaded Documentation Archive
1.0.1 Oct 30, 2016 Go to the documentation of tuple 1.0.1 Download tuple 1.0.1 archive
1.0.0 Nov 24, 2015 Go to the documentation of tuple 1.0.0 Download tuple 1.0.0 archive
0.4.0 Sep 24, 2015 Go to the documentation of tuple 0.4.0 Download tuple 0.4.0 archive
0.3.0 Sep 23, 2015 Go to the documentation of tuple 0.3.0 Download tuple 0.3.0 archive
0.2.0 Sep 21, 2015 Go to the documentation of tuple 0.2.0 Download tuple 0.2.0 archive
0.1.2 Sep 21, 2015 Go to the documentation of tuple 0.1.2 Download tuple 0.1.2 archive
0.1.1 Sep 19, 2015 Go to the documentation of tuple 0.1.1 Download tuple 0.1.1 archive
0.1.0 Oct 17, 2014 Go to the documentation of tuple 0.1.0 Download tuple 0.1.0 archive


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

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


Describes how popular the package is relative to other packages. [more]
98 / 100
Code health derived from static analysis. [more]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
38 / 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:tuple/tuple.dart.


  • Package is getting outdated.

    The package was released 84 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.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use tuple.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 hint.

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

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.6.0
quiver_hashcode >=1.0.0-dev.1 <1.1.0 1.0.0
Dev dependencies
test any