{"id":13550629,"url":"https://github.com/rows/automata","last_synced_at":"2025-04-03T00:34:20.626Z","repository":{"id":39709410,"uuid":"457402548","full_name":"rows/automata","owner":"rows","description":"A Dart DSL for finite state machine and state charts","archived":false,"fork":false,"pushed_at":"2022-06-29T12:58:56.000Z","size":84,"stargazers_count":51,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-03T20:36:55.401Z","etag":null,"topics":["dart","flutter","statemachines"],"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/rows.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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-09T14:53:03.000Z","updated_at":"2024-10-14T08:10:20.000Z","dependencies_parsed_at":"2022-09-20T08:31:09.292Z","dependency_job_id":null,"html_url":"https://github.com/rows/automata","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rows%2Fautomata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rows%2Fautomata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rows%2Fautomata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rows%2Fautomata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rows","download_url":"https://codeload.github.com/rows/automata/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246916734,"owners_count":20854511,"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","flutter","statemachines"],"created_at":"2024-08-01T12:01:35.524Z","updated_at":"2025-04-03T00:34:20.034Z","avatar_url":"https://github.com/rows.png","language":"Dart","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://rows.com\"\u003e\n  \u003cbr /\u003e\n  \u003cimg src=\"https://rows.com/media/logo.svg\" alt=\"Rows\" width=\"150\"/\u003e\n  \u003cbr /\u003e\n    \u003csub\u003e\u003cstrong\u003eSpreadsheet with superpowers!\u003c/strong\u003e\u003c/sub\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca title=\"Pub\" href=\"https://pub.dev/packages/automata\" \u003e\u003cimg src=\"https://img.shields.io/pub/v/automata.svg?style=popout\" /\u003e\u003c/a\u003e\n  \u003ca title=\"Rows lint\" href=\"https://pub.dev/packages/rows_lint\" \u003e\u003cimg src=\"https://img.shields.io/badge/Styled%20by-Rows-754F6C?style=popout\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Automata\nA dart package to create Finite State Machines and State Charts following [SCXML](https://www.w3.org/TR/scxml) specification.\n\nThe main highlights of automata are:\n- Declarative and type-based\n- Compound states (nested states)\n- Parallel states\n- Initial states\n- Guard conditions\n- Eventless transitions\n- Actions\n- Invoke async services\n- onEntry / onExit\n- onTransition\n\n## Documentation\nCheck our wiki for a more in-depth documentation: https://github.com/rows/automata/wiki\n\n## Super quick start:\n\n```\ndart pub add automata\n\nor\n\nflutter pub add automata\n```\n\n```dart\nimport 'package:automata/automata.dart';\n\nclass Inactive extends AutomataState {}\nclass Active extends AutomataState {}\nclass OnToggle extends AutomataEvent {}\n\nfinal machine = StateMachine.create(\n  (g) =\u003e g\n    ..initial\u003cInactive\u003e()\n    ..state\u003cInactive\u003e(\n      builder: (g) =\u003e g..on\u003cOnToggle, Active\u003e()\n    )\n    ..state\u003cActive\u003e(\n      builder: (g) =\u003e g..on\u003cOnToggle, Inactive\u003e()\n    ),\n  onTransition: (e, value) =\u003e print(\n    '''\n    ## Transition::\n    Received Event: $e\n    Value: $value\n    ''',\n  ),\n);\n\nmachine.send(OnToggle());\n```\n\n## Credits\nWhile developing this packages we were heavily inspired by [Tinder's StateMachine](https://github.com/Tinder/StateMachine), [Stately's XState](https://github.com/statelyai/xstate) and the [SCXML specification](https://www.w3.org/TR/scxml).\n","funding_links":[],"categories":["Dart"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frows%2Fautomata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frows%2Fautomata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frows%2Fautomata/lists"}