duple 1.3.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • new44

Duple

Minimal tuple library for Dart.

Usage

Simple usage examples as follows. See accompanying tests for more specific examples.

Import duple.

import 'package:duple/duple.dart';

Empty Tuple

All EmptyTuples are identical.

main() {
  var emptyTuple = EmptyTuple();
  assert(emptyTuple == EmptyTuple());
}

One-Tuple

main() {
  var oneTupleWithString = Tuple1<String>('hello world!');
  var oneTupleWithInt = Tuple1<int>(1);
  print("One tuple contains ${oneTupleWithInt.item0}");
}

Two-Tuple

main() {
  var twoTupleWithSameTypes = Tuple2<int, int>(1, 2);
  var twoTupleWithDifferentTypes = Tuple2<int, String>(1, 'X');
  print("Two tuple contains ${twoTupleWithSameTypes.item0}, "
  " and ${twoTupleWithSameTypes.item1}");
}

1.3.0

  • Added Tuple3, Tuple4, Tuple5, Tuple6 and Tuple7.

1.2.0

  • Added Tuple2.

1.1.1

  • Fixed mutable Tuple1.

1.1.0

  • Added Tuple1.
  • Refactored tests on EmptyTuple.

1.0.0

  • Added EmptyTuple.

Use this package as a library

1. Depend on it

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


dependencies:
  duple: ^1.3.0

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:duple/duple.dart';
  
Version Uploaded Documentation Archive
1.3.0 Dec 24, 2018 Go to the documentation of duple 1.3.0 Download duple 1.3.0 archive
1.2.0 Dec 24, 2018 Go to the documentation of duple 1.2.0 Download duple 1.2.0 archive
1.1.1 Dec 24, 2018 Go to the documentation of duple 1.1.1 Download duple 1.1.1 archive
1.1.0 Dec 24, 2018 Go to the documentation of duple 1.1.0 Download duple 1.1.0 archive
1.0.0 Dec 24, 2018 Go to the documentation of duple 1.0.0 Download duple 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
44
Learn more about scoring.

We analyzed this package on Jan 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.10

Platforms

Detected platforms: Flutter, web, other

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

Health suggestions

Format lib/src/empty_tuple.dart.

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

Format lib/src/tuple1.dart.

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

Format lib/src/tuple2.dart.

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

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/tuple4.dart (Run dartfmt to format lib/src/tuple4.dart.)
  • lib/src/tuple5.dart (Run dartfmt to format lib/src/tuple5.dart.)
  • lib/src/tuple6.dart (Run dartfmt to format lib/src/tuple6.dart.)
  • lib/src/tuple7.dart (Run dartfmt to format lib/src/tuple7.dart.)

Maintenance suggestions

The description is too short. (-20 points)

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. (-10 points)

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 duple.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
test ^1.0.0