{"id":21377186,"url":"https://github.com/odroe/single","last_synced_at":"2025-07-20T17:32:37.471Z","repository":{"id":61974843,"uuid":"294807196","full_name":"odroe/single","owner":"odroe","description":"Singleton mode container to store global singleton resources","archived":false,"fork":false,"pushed_at":"2024-05-01T14:08:14.000Z","size":13,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-01T15:13:11.453Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/odroe.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":"2020-09-11T20:35:48.000Z","updated_at":"2023-11-28T09:19:23.000Z","dependencies_parsed_at":"2024-11-05T15:35:07.568Z","dependency_job_id":"49ecc5ac-9df9-4487-a708-c9a28cba68d7","html_url":"https://github.com/odroe/single","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"5e5c5725960d2ca02c0cd7920258ac11d4addbdf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/odroe/single","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odroe%2Fsingle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odroe%2Fsingle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odroe%2Fsingle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odroe%2Fsingle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/odroe","download_url":"https://codeload.github.com/odroe/single/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odroe%2Fsingle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264639552,"owners_count":23642309,"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-22T09:19:25.095Z","updated_at":"2025-07-20T17:32:37.455Z","avatar_url":"https://github.com/odroe.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Single\n\nSingleton mode container to store global singleton resources.\n\n## Installation\n\n- Dart: `dart pub add single`\n- Flutter: `flutter pub add single`\n\n## Usage\n\n```dart\nimport 'package:single/single.dart';\n\n// Add singleton resources\nsingle + () =\u003e MyClass();\n\n// Get singleton resources\nMyClass myClass = single\u003cMyClass\u003e();\n```\n\n## Readmap\n\n- [x] Singleton mode container.\n- [x] `+` operator to add singleton resources.\n- [x] Callable to get singleton resources.\n- [ ] Use annotations to automatically register singletons.\n\n\u003e `Use annotations to automatically register singletons.` Need to learn more about related technologies:\n\u003e - `source_gen`? - But this method is not elegant\n\u003e - `dart:mirrors`? - This is ideal, but Flutter does not support it! Whether Single really needs to be used in Flutter is still uncertain. We currently use it on the Dart server.\n\u003e    Here is a reflection example：https://github.com/odroe/single/tree/mirrors However, bugs were encountered during development.\n\n## License\n\nBSD 3-Clause License.\n\nCopyright (c) 2021, [Odroe Inc.](https://odroe.com) All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodroe%2Fsingle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodroe%2Fsingle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodroe%2Fsingle/lists"}