{"id":23395647,"url":"https://github.com/viniciusamelio/ez_either","last_synced_at":"2025-04-08T17:19:17.166Z","repository":{"id":61973217,"uuid":"462927432","full_name":"viniciusamelio/ez_either","owner":"viniciusamelio","description":"A package to handle either with ease and simplicity","archived":false,"fork":false,"pushed_at":"2022-08-22T11:53:07.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T13:36:20.404Z","etag":null,"topics":["dart","either","fluter"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viniciusamelio.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-02-23T22:30:39.000Z","updated_at":"2022-03-14T00:44:41.000Z","dependencies_parsed_at":"2022-10-24T13:30:30.199Z","dependency_job_id":null,"html_url":"https://github.com/viniciusamelio/ez_either","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/viniciusamelio%2Fez_either","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusamelio%2Fez_either/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusamelio%2Fez_either/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusamelio%2Fez_either/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viniciusamelio","download_url":"https://codeload.github.com/viniciusamelio/ez_either/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247888568,"owners_count":21013002,"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":["dart","either","fluter"],"created_at":"2024-12-22T07:16:52.140Z","updated_at":"2025-04-08T17:19:17.145Z","avatar_url":"https://github.com/viniciusamelio.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ez_Either\n\nMost times I add packages such as fpdart to my projects and I notice that the only thing I am really using in my code is Either. To solve this, I'm creating this package that is nothing but a simpler version of Either.\n\n## Installing\n\n```yaml\n# pubspec.yaml\ndependencies:\n  ez_either: ^1.0.0 # Check out the latest version\n```\n\n## Usage\n\nYou should use Either when your code can return two different types, a Right (That should be the type you need to keep your business flow going on) and a Left (A exception, error or something that will need to be handled)\n\n```dart\nimport \"package:ez_either:ez_either.dart\";\n\n// It is recommended to extract value using fold\nfinal Either\u003cFailure, UserDto\u003e userOrFailure = Right(UserDto());\n\nprint(either.isRight()); // true\nprint(either.isLeft()); // false\n\nfinal result = usersOrFailure.fold(\n  (left) =\u003e left,\n  (right) =\u003e right,\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciusamelio%2Fez_either","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviniciusamelio%2Fez_either","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciusamelio%2Fez_either/lists"}