{"id":20664040,"url":"https://github.com/flutterando/builders","last_synced_at":"2025-10-08T19:05:49.615Z","repository":{"id":51336725,"uuid":"297139727","full_name":"Flutterando/builders","owner":"Flutterando","description":"Use Consumer, Select and BlocConsumer in any System Injector","archived":false,"fork":false,"pushed_at":"2025-06-13T18:53:52.000Z","size":187,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-18T04:01:50.082Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/builders","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flutterando.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-20T18:36:32.000Z","updated_at":"2025-06-13T18:53:56.000Z","dependencies_parsed_at":"2025-10-08T19:05:44.616Z","dependency_job_id":null,"html_url":"https://github.com/Flutterando/builders","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Flutterando/builders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flutterando%2Fbuilders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flutterando%2Fbuilders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flutterando%2Fbuilders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flutterando%2Fbuilders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flutterando","download_url":"https://codeload.github.com/Flutterando/builders/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flutterando%2Fbuilders/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000682,"owners_count":26082804,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-16T19:21:49.848Z","updated_at":"2025-10-08T19:05:49.599Z","avatar_url":"https://github.com/Flutterando.png","language":"Dart","readme":"# builders\r\n\r\nUse Consumer, Select and BlocConsumer in any System Injector\r\n\r\n## How Install\r\n\r\nOpen your project's pubspec.yaml and add flutter_modular as a dependency:\r\n\r\n```dart\r\ndependencies:\r\n  builders: any\r\n```\r\nYou can also provide the git repository as source instead, to try out the newest features and fixes:\r\n\r\n```dart\r\ndependencies:\r\n  builders:\r\n    git:\r\n      url: https://github.com/Flutterando/builders\r\n```\r\n\r\n## Configure your System Injector\r\n\r\nYou can use any System Injector for example Modular or Get_it.\r\n\r\n```dart\r\nmain(){\r\n    \r\n    //using Modular\r\n    Builders.systemInjector(Modular.get);\r\n    \r\n    //using Get_it\r\n    Builders.systemInjector(GetIt.I.get);\r\n\r\n    runApp(YourAmazingApp());\r\n}\r\n```\r\n\r\n## Using in your Flutter App\r\n\r\nHere are some Builders known to the community. Here we have Consumer and Selector (Originally from the Provider package) and BlocConsumer, (from the flutter_bloc package)\r\n\r\n### Consumer\r\n\r\nConsumer is used when you want to listen to a class that extends from ChangeNotifier:\r\n```dart\r\nclass MyCounter extends ChangeNotifier {\r\n\r\n    int value;\r\n\r\n    increment() {\r\n        value++;\r\n        notifyListeners();\r\n    }\r\n\r\n}\r\n```\r\nin your View:\r\n```dart\r\nConsumer\u003cMyCounter\u003e(\r\n    builder: (context, myCounter){\r\n        return Text('${myCounter.value}');\r\n    }\r\n);\r\n```\r\n\r\n### Selector\r\n\r\nSelector works like Consumers, however you can select and listen to only one property of your Object.\r\n\r\n```dart\r\nSelector\u003cMyCounter, int\u003e(\r\n    selector: (myCounter) =\u003e myCounter.value,\r\n    builder: (context, value){\r\n        return Text('$value');\r\n    }\r\n);\r\n```\r\n\r\n### BlocConsumer\r\n\r\nListen to custom streams from the bloc package (Bloc and Cubit).\r\n\r\n```dart\r\nclass MyCounterBloc extends Cubit\u003cint\u003e {\r\n\r\n    MyCounterBloc(): super(0);\r\n\r\n    increment() =\u003e emit(state + 1);\r\n\r\n}\r\n```\r\nin your View:\r\n```dart\r\nBlocConsumer\u003cMyCounterBloc, int\u003e(\r\n    builder: (context, state){\r\n        return Text('$state');\r\n    }\r\n);\r\n```\r\n\r\n## Features and bugs\r\n\r\nPlease send feature requests and bugs at the [issue tracker](https://github.com/Flutterando/builders/issues).\r\n\r\nThis README was created based on templates made available by Stagehand under a BSD-style [license](https://github.com/dart-lang/stagehand/blob/master/LICENSE).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutterando%2Fbuilders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflutterando%2Fbuilders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutterando%2Fbuilders/lists"}