# tuple 2.0.2

A library providing a tuple data structure.




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'tuple:2.0.2'
```
Published: 2023-06-12T15:47:02.043724Z
Expected archive SHA-256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151

Available in cache; verification: upstream_checksum
## Direct dependencies

## Package README (untrusted upstream documentation)
[![Dart](https://github.com/google/tuple.dart/actions/workflows/build.yaml/badge.svg)](https://github.com/google/tuple.dart/actions/workflows/build.yaml)
[![Pub](https://img.shields.io/pub/v/tuple.svg)](https://pub.dev/packages/tuple)
[![package publisher](https://img.shields.io/pub/publisher/tuple.svg)](https://pub.dev/packages/tuple/publisher)

A library providing a tuple data structure.

## Status - complete

We consider this package to be feature complete. With Dart 3.0, users now have
the ability to use [Records](https://dart.dev/language/records):

> Records are an anonymous, immutable, aggregate type. Like other collection
  types, they let you bundle multiple objects into a single object. 

```dart
  var record = (123, true);
  print('${record.$1}: ${record.$2}');
```

By and large, Records serve the same use cases that `package:tuple` had been
used for. New users coming to this package should likely look at using Dart
Records instead. Existing uses of package:tuple will continue to work, however
we don't intend to enhance the functionality of this package; we will continue
to maintain this package from the POV of bug fixes.

## Usage example

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

print(t.item1); // prints 'a'
print(t.item2); // prints '10'
```

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

## Changelog
## 2.0.2

- Update the readme to indicate that this package is considered feature
  complete.
- Require Dart 2.17.

## 2.0.1

- Remove the dependency on `package:quiver`.
- Require Dart 2.14.0.
- Switch to using `package:lints/recommended.yaml` for analysis.

## 2.0.0

- Stable null safety release.
- Require Dart 2.12.0.

## 1.0.3

- Require Dart 2.0.0.
- Fixed Tuple7's operator==.

## 1.0.2

- Prepare for Dart 2 stable.

## 1.0.1

- Fix all strong-mode warnings and errors.

## 1.0.0

- Remove \_hash function and use quiver_hashcode package instead.

## 0.4.0

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

## 0.3.0

- Add toList method.

## 0.2.0

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

## 0.1.2

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

## 0.1.1

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

## 0.1.0

- Initial release.







 
