{"id":32307739,"url":"https://github.com/avdosev/tuple_dart","last_synced_at":"2026-02-22T18:03:20.818Z","repository":{"id":61973034,"uuid":"394284524","full_name":"avdosev/tuple_dart","owner":"avdosev","description":"tuple data structure for Dart","archived":false,"fork":false,"pushed_at":"2022-04-05T11:08:17.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-23T07:30:50.573Z","etag":null,"topics":["dart","flutter","tuple","tuple-dart","tuple-in-dart","tuple-library"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/tuple_dart","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avdosev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-09T12:34:14.000Z","updated_at":"2024-04-09T03:05:06.000Z","dependencies_parsed_at":"2022-10-24T13:30:23.512Z","dependency_job_id":null,"html_url":"https://github.com/avdosev/tuple_dart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/avdosev/tuple_dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdosev%2Ftuple_dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdosev%2Ftuple_dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdosev%2Ftuple_dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdosev%2Ftuple_dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avdosev","download_url":"https://codeload.github.com/avdosev/tuple_dart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdosev%2Ftuple_dart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29721057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T15:10:41.462Z","status":"ssl_error","status_checked_at":"2026-02-22T15:10:04.636Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","tuple","tuple-dart","tuple-in-dart","tuple-library"],"created_at":"2025-10-23T07:23:02.004Z","updated_at":"2026-02-22T18:03:20.803Z","avatar_url":"https://github.com/avdosev.png","language":"Dart","readme":"# Tuple dart\n\nA library providing a tuple data structure for Dart. \n\n* No dependency\n* Easy usage\n* Support `tuple1` - `tuple8`\n* ideal for use with `compute`\n* Used by the [itertools](https://pub.dev/packages/itertools) package\n\n## Usage\n\n```dart\nimport 'package:tuple_dart/tuple.dart';\n```\nor \n```dart\nimport 'package:tuple_dart/tuple_dart.dart';\n```\n\n## Example\n\n```dart\nimport 'package:tuple_dart/tuple.dart';\n\nvoid print2(Object? first, Object? second) {\n  print('$first $second');\n}\n\nvoid main() {\n  final tuple = Tuple2('first', 2); // type Tuple2\u003cString, int\u003e\n  tuple.apply(print2); // output: \"first 2\";\n  final tuple2 = tuple.withItem2('second'); // type Tuple2\u003cString, String\u003e\n  tuple2.apply(print2); // output: \"first second\";\n  // or equal\n  print2.tuplized(tuple); // output: \"first 2\";\n  // also R Function(Tuple\u003cT1...TN\u003e) has detuplized getter\n  \n  // tuplize transformation\n  // R Function(T1...TN) -\u003e R Function(Tuple\u003cT1...TN\u003e);\n  // final print2tuplized = print2.tuplized; \n  \n  // detuplized transformation\n  // R Function(Tuple\u003cT1...TN\u003e) -\u003e R Function(T1...TN);\n  // final print2detupled = print2tuplized.detuplized; \n\n  // compatible with MapEntry\n  final tuples = [\n    Tuple2('1', 111),\n    Tuple2('2', 222),\n    Tuple2('3', 333),\n    Tuple2('4', 444),\n  ];\n\n  print(Map\u003cString, int\u003e.fromEntries(tuples));\n}\n\n```\n\n### ideal for use with compute\n\n```dart\nimport 'package:tuple_dart/tuple.dart';\nimport 'package:flutter/foundation.dart';\n\ndouble hardCalculation(double a, double b, double c) {\n  double result = 0.0;\n  for (int i = 1; i \u003c 1000; i++) {\n    result = i * a + b * c / i;\n  }\n  return result;\n}\n\nvoid main() async {\n  final result = await compute(hardCalculation.tuplized, Tuple3(0.1, 2.0, 10.0));\n  print(result);\n}\n```\n\n\n## Links\n\n[Pub dev][pubdev]\n\n[Documentation][docs]\n\n[Issue tracker][tracker]\n\n## Features and bugs\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n[tracker]: https://github.com/avdosev/tuple_dart/issues\n[pubdev]: https://pub.dev/packages/tuple_dart\n[docs]: https://pub.dev/documentation/tuple_dart/latest/","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favdosev%2Ftuple_dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favdosev%2Ftuple_dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favdosev%2Ftuple_dart/lists"}