{"id":21710976,"url":"https://github.com/intales/resultify","last_synced_at":"2026-05-21T07:10:01.558Z","repository":{"id":210238190,"uuid":"726095820","full_name":"intales/resultify","owner":"intales","description":"A Dart package for result-oriented programming, providing Result\u003cR, E\u003e type with convenient methods for streamlined error handling.","archived":false,"fork":false,"pushed_at":"2023-12-11T13:47:49.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-20T18:16:46.640Z","etag":null,"topics":["dart","error-handling","flutter","result-type"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/resultify","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intales.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-01T14:26:30.000Z","updated_at":"2024-11-25T09:22:28.000Z","dependencies_parsed_at":"2023-12-11T14:59:01.901Z","dependency_job_id":null,"html_url":"https://github.com/intales/resultify","commit_stats":null,"previous_names":["intales/resultify"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/intales/resultify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intales%2Fresultify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intales%2Fresultify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intales%2Fresultify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intales%2Fresultify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intales","download_url":"https://codeload.github.com/intales/resultify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intales%2Fresultify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33292228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T02:57:32.698Z","status":"ssl_error","status_checked_at":"2026-05-21T02:57:31.990Z","response_time":62,"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","error-handling","flutter","result-type"],"created_at":"2024-11-25T23:18:40.982Z","updated_at":"2026-05-21T07:10:01.542Z","avatar_url":"https://github.com/intales.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Resultify\n\nA Dart package for result-oriented programming, providing a `Result\u003cR, E\u003e` type with convenient methods for streamlined error handling.\n\n## Usage\n\nTo use this package, add `resultify` as a [dependency in your `pubspec.yaml`](https://dart.dev/guides/packages):\n\n```yaml\ndependencies:\n    resultify: \u003clatest-version\u003e\n```\n\nNow you can import the package in your Dart code:\n\n```dart\nimport 'package:resultify/resultify.dart';\n```\n\n## Result Type\n\nThe `Result\u003cR, E\u003e` type encapsulates either a successful result (`R`) or an error (`E`).\n\n```dart\nResult\u003cint, String\u003e divide(int a, int b) {\n    if (b == 0) return Result.error(\"Cannot divide by zero\");\n    return Result.success(a ~/ b);\n}\n```\n\n## Convinient methods\n\nThe package provides convenient methods for working with results:\n\n- `getResultOrDefault`: Gets the result or a default value.\n- `getErrorOrDefault`: Gets the error or a default value.\n- `match`: Matches the result, invoking callbacks based on success or error.\n- `wrap`: Executes a function and wraps the result, handling exceptions.\n\n\nFor more examples and detailed usage, please refer to the [example](example/resultify_example.dart) directory.\n\n## Issues and Contributions\n\nFeel free to report issues or contribute to the project on [GitHub](https://github.com/intales/resultify).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintales%2Fresultify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintales%2Fresultify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintales%2Fresultify/lists"}