{"id":31644152,"url":"https://github.com/bgildson/redux_prism","last_synced_at":"2025-10-07T04:09:43.060Z","repository":{"id":56838013,"uuid":"189506884","full_name":"bgildson/redux_prism","owner":"bgildson","description":"Library used to easily access dispatched actions in a Redux Store.","archived":false,"fork":false,"pushed_at":"2020-02-05T03:15:06.000Z","size":70,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-22T19:37:13.880Z","etag":null,"topics":["actions","dart","flutter","redux"],"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/bgildson.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":"2019-05-31T01:33:38.000Z","updated_at":"2020-06-25T21:00:04.000Z","dependencies_parsed_at":"2022-09-12T10:20:10.895Z","dependency_job_id":null,"html_url":"https://github.com/bgildson/redux_prism","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bgildson/redux_prism","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgildson%2Fredux_prism","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgildson%2Fredux_prism/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgildson%2Fredux_prism/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgildson%2Fredux_prism/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bgildson","download_url":"https://codeload.github.com/bgildson/redux_prism/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgildson%2Fredux_prism/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717431,"owners_count":26033543,"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-07T02:00:06.786Z","response_time":59,"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":["actions","dart","flutter","redux"],"created_at":"2025-10-07T04:06:16.716Z","updated_at":"2025-10-07T04:09:43.051Z","avatar_url":"https://github.com/bgildson.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redux_prism\n\n[![Build Status](https://travis-ci.org/bgildson/redux_prism.svg?branch=master)](https://travis-ci.org/bgildson/redux_prism)\n[![Coverage Status](https://coveralls.io/repos/github/bgildson/redux_prism/badge.svg?branch=master)](https://coveralls.io/github/bgildson/redux_prism?branch=master)\n[![pub package](https://img.shields.io/pub/v/redux_prism.svg)](https://pub.dartlang.org/packages/redux_prism)\n\nLibrary used to easily access dispatched actions in a [Redux](https://pub.dartlang.org/packages/redux) Store. The library defines a pattern to catch new dispatched actions and listen to them in a reactive context. The `StorePrism.middleware` works like a proxy in the store middlewares and add every new action in the `StorePrism.actions` stream.\n\n## Usage\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:flutter_redux/flutter_redux.dart';\nimport 'package:redux/redux.dart';\nimport 'package:redux_prism/redux_prism.dart';\n\nvoid main() =\u003e runApp(MessageApp());\n\nclass MessageApp extends StatelessWidget {\n  Widget build(BuildContext context) =\u003e\n    StoreProvider\u003cString\u003e(\n      store: Store\u003cString\u003e(\n        (state, action) =\u003e state,\n        middleware: [\n          // register StorePrism \"proxy\" middleware\n          StorePrism.middleware\n        ],\n      ),\n      child: MaterialApp(\n        title: 'Redux Prism',\n        home: MessagePage()\n      ),\n    );\n}\n\n@immutable\nclass MessageAction {\n  final String message;\n\n  MessageAction({this.message});\n\n  @override\n  String toString() =\u003e 'MessageAction { message: $message }';\n}\n\nclass MessagePage extends StatelessWidget {\n  final GlobalKey\u003cScaffoldState\u003e _scaffoldKey = GlobalKey();\n  final TextEditingController _messageController = TextEditingController();\n\n  MessagePage({Key key}) : super(key: key);\n\n  @override\n  Widget build(BuildContext context) =\u003e\n    StorePrismListener(\n      listen: (action) =\u003e\n        _scaffoldKey.currentState\n          ..hideCurrentSnackBar()\n          ..showSnackBar(SnackBar(content: Text(action.toString()))),\n      child: Scaffold(\n        key: _scaffoldKey,\n        appBar: AppBar(title: Text('Redux Prism')),\n        body: Column(\n          children: \u003cWidget\u003e[\n            TextField(\n              controller: _messageController,\n              decoration: InputDecoration(labelText: 'Message')\n            ),\n            StoreConnector\u003cString, Function(String)\u003e(\n              converter: (Store\u003cString\u003e store) =\u003e\n                (message) =\u003e store.dispatch(MessageAction(message: message)),\n              rebuildOnChange: false,\n              builder: (_, dispatchMessageAction) =\u003e\n                OutlineButton(\n                  onPressed: () =\u003e dispatchMessageAction(_messageController.text),\n                  child: Text('SEND')\n                )\n            ),\n          ],\n        ),\n      ),\n    );\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgildson%2Fredux_prism","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgildson%2Fredux_prism","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgildson%2Fredux_prism/lists"}