{"id":21619106,"url":"https://github.com/bannzai/async_value_group","last_synced_at":"2025-04-11T08:44:38.470Z","repository":{"id":62950426,"uuid":"563671721","full_name":"bannzai/async_value_group","owner":"bannzai","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-25T12:12:34.000Z","size":89,"stargazers_count":46,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T05:00:01.162Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/bannzai.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":"2022-11-09T04:41:23.000Z","updated_at":"2025-02-22T00:36:33.000Z","dependencies_parsed_at":"2022-11-09T18:47:15.547Z","dependency_job_id":null,"html_url":"https://github.com/bannzai/async_value_group","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannzai%2Fasync_value_group","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannzai%2Fasync_value_group/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannzai%2Fasync_value_group/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannzai%2Fasync_value_group/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bannzai","download_url":"https://codeload.github.com/bannzai/async_value_group/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248362720,"owners_count":21091185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-24T23:07:55.989Z","updated_at":"2025-04-11T08:44:38.450Z","avatar_url":"https://github.com/bannzai.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Features\nasync_value_group is a a Dart library for grouping some [riverpod](https://github.com/rrousselGit/riverpod) `AsyncValue`s into single `AsyncValue`.\n- Grouping some `AsyncValue`s into single `AsyncValue` and retrieve all `AsyncValue.data` as a tuple.\n- Waiting to be done multiple asynchronous process.\n- If you use hooks_riverpod, call `AsyncValue.when` only once in `Widget.build` method even if multiple AsyncValues are required.\n\n## Usage\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:hooks_riverpod/hooks_riverpod.dart';\nimport 'package:async_value_group/async_value_group.dart';\n\nclass TweetsPage extends HookConsumerWidget {\n  const TweetsPage({Key? key}) : super(key: key);\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    return AsyncValueGroup.group2(\n      ref.watch(tweetsProvider),\n      ref.watch(userProvider),\n    ).when(\n      data: (t) =\u003e t.$1.isEmpty ? const TweetsEmpty() : TweetsBody(tweets: t.$1, user: t.$2),\n      error: (error, st) =\u003e ErrorPage(error: error),\n      loading: () =\u003e const Loading(),\n    );\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbannzai%2Fasync_value_group","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbannzai%2Fasync_value_group","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbannzai%2Fasync_value_group/lists"}