{"id":30865485,"url":"https://github.com/hackware1993/flutter_pvstate","last_synced_at":"2026-05-16T08:04:24.060Z","repository":{"id":112573518,"uuid":"485617789","full_name":"hackware1993/Flutter_PVState","owner":"hackware1993","description":"Extremely lightweight state management framework in only 120 lines of code.","archived":false,"fork":false,"pushed_at":"2024-12-07T07:50:19.000Z","size":216,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T16:22:21.044Z","etag":null,"topics":["flutter","state-management"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hackware1993.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-04-26T03:18:49.000Z","updated_at":"2024-12-07T07:50:23.000Z","dependencies_parsed_at":"2023-05-16T14:00:34.830Z","dependency_job_id":null,"html_url":"https://github.com/hackware1993/Flutter_PVState","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hackware1993/Flutter_PVState","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackware1993%2FFlutter_PVState","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackware1993%2FFlutter_PVState/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackware1993%2FFlutter_PVState/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackware1993%2FFlutter_PVState/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hackware1993","download_url":"https://codeload.github.com/hackware1993/Flutter_PVState/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackware1993%2FFlutter_PVState/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274095698,"owners_count":25221493,"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-09-07T02:00:09.463Z","response_time":67,"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":["flutter","state-management"],"created_at":"2025-09-07T21:12:19.164Z","updated_at":"2026-05-16T08:04:19.027Z","avatar_url":"https://github.com/hackware1993.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter_PVState\n\nExtremely lightweight state management framework in only 120 lines of code.\n\nDirect access to state is the bottom line, indirect access such as controller.something is\ncompletely unacceptable.\n\n**I have developed the world's fastest general purpose sorting algorithm, which is on average 3 times faster than Quicksort and up to 20 times faster**, [ChenSort](https://github.com/hackware1993/ChenSort)\n\n## Getting Started\n\n![effect.gif](https://github.com/hackware1993/Flutter_PVState/blob/master/effect.gif?raw=true)\n\n```dart\nvoid main() {\n  runApp(Stateful.of(CounterVState()));\n}\n\nimport 'package:flutter/material.dart';\nimport 'package:flutter_constraintlayout/flutter_constraintlayout.dart';\nimport 'package:flutter_pvstate/pv_state.dart';\n\n/// Presenter state, logic is written here\nabstract class CounterPState extends BasePagePState {\n  final count = obs(0);\n\n  void add() {\n    count.value = count.value + 1;\n  }\n\n// int count = 0;\n//\n// void add() {\n//   setState(() {\n//     count++;\n//   });\n// }\n}\n\n/// View state, view is written here\nclass CounterVState extends CounterPState with VState {\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        appBar: AppBar(\n          title: const Text('Flutter Demo Home Page'),\n        ),\n        body: ConstraintLayout(\n          children: [\n            const Text(\n              'You have pushed the button this many times:',\n            ).applyConstraint(\n              centerTo: parent,\n            ),\n\n            /// Local update\n            ValueListenableBuilder(\n              valueListenable: count,\n              builder: (_, value, __) {\n                return Text(\n                  '$value',\n                  style: Theme\n                      .of(context)\n                      .textTheme\n                      .headline4,\n                );\n              },\n            ).applyConstraint(\n              outBottomCenterTo: rId(0),\n            ),\n\n            /// Global update\n            // Text(\n            //   '$count', // Direct access to count\n            //   style: Theme.of(context).textTheme.headline4,\n            // ).applyConstraint(\n            //   outBottomCenterTo: rId(0),\n            // ),\n\n            FloatingActionButton(\n              onPressed: add, // Widget and logic separation\n              child: const Icon(Icons.add),\n            ).applyConstraint(\n              bottomRightTo: parent,\n              margin: const EdgeInsets.only(\n                right: 20,\n                bottom: 20,\n              ),\n            )\n          ],\n        ),\n      ),\n    );\n  }\n}\n```\n\n# License\n\n```\nMIT License\n\nCopyright (c) 2022 hackware1993\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and\nassociated documentation files (the \"Software\"), to deal in the Software without restriction,\nincluding without limitation the rights to use, copy, modify, merge, publish, distribute,\nsublicense, and/or sell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial\nportions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\nNOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES\nOR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackware1993%2Fflutter_pvstate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackware1993%2Fflutter_pvstate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackware1993%2Fflutter_pvstate/lists"}