{"id":27170259,"url":"https://github.com/masahidemori-simpleappli/simple_widget_markup","last_synced_at":"2026-03-05T06:33:17.470Z","repository":{"id":50658852,"uuid":"440705373","full_name":"MasahideMori-SimpleAppli/simple_widget_markup","owner":"MasahideMori-SimpleAppli","description":"This contains a simple widget markup language specification and converter. This can be used as a markup language for Flutter development. Easily create text and screen layouts.","archived":false,"fork":false,"pushed_at":"2024-10-21T09:50:57.000Z","size":631,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-21T14:10:37.586Z","etag":null,"topics":["dart","flutter","flutter-ui","markup-language"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/simple_widget_markup","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/MasahideMori-SimpleAppli.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":"2021-12-22T02:07:31.000Z","updated_at":"2024-10-21T09:51:01.000Z","dependencies_parsed_at":"2024-04-20T04:31:32.757Z","dependency_job_id":"dee25812-5e52-458f-b809-09ac40c7945e","html_url":"https://github.com/MasahideMori-SimpleAppli/simple_widget_markup","commit_stats":{"total_commits":67,"total_committers":2,"mean_commits":33.5,"dds":"0.31343283582089554","last_synced_commit":"0da700c7537b2927c658f9b8d03c02eaf7da304d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasahideMori-SimpleAppli%2Fsimple_widget_markup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasahideMori-SimpleAppli%2Fsimple_widget_markup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasahideMori-SimpleAppli%2Fsimple_widget_markup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasahideMori-SimpleAppli%2Fsimple_widget_markup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MasahideMori-SimpleAppli","download_url":"https://codeload.github.com/MasahideMori-SimpleAppli/simple_widget_markup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999533,"owners_count":21030978,"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","flutter-ui","markup-language"],"created_at":"2025-04-09T07:45:42.541Z","updated_at":"2026-03-05T06:33:17.411Z","avatar_url":"https://github.com/MasahideMori-SimpleAppli.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple_widget_markup\r\n\r\n(en)Japanese ver is [here](https://github.com/MasahideMori-SimpleAppli/simple_widget_markup/blob/main/README_JA.md).  \r\n(ja)この解説の日本語版は[ここ](https://github.com/MasahideMori-SimpleAppli/simple_widget_markup/blob/main/README_JA.md)にあります。\r\n\r\n## Overview\r\nThis package is a practical Flutter (Dart) implementation of the Simple Widget Markup Language (SpWML).  \r\nSpWML allows for users to create statically flutter layout.\r\nIt also reduces the amount of program code required and often speeds up compilation.\r\nFiles output in SpWML have the extension .spwml.\r\n\r\n## Usage\r\n### Quick Start\r\nBelow is detailed documentation.  \r\n[SpWML documentation](https://masahidemori-simpleappli.github.io/spwml_docs/index.html)\r\n\r\nYou can try how it works on the following sites.  \r\n[SpWML Editor](https://simple-widget-markup-editor.web.app/)\r\n\r\nThe states of text fields, dropdowns, etc. are managed by the following manager classes,\r\nso no special operations are required.  \r\nIf you want to send user input values to the server, you can serialize the manager classes.  \r\n[simple_managers](https://pub.dev/packages/simple_managers)\r\n\r\n### Sample code\r\n```dart\r\nimport 'package:flutter/material.dart';\r\nimport 'package:simple_widget_markup/simple_widget_markup.dart';\r\n\r\nvoid main() {\r\n  runApp(const MyApp());\r\n}\r\n\r\nclass MyApp extends StatelessWidget {\r\n  const MyApp({Key? key}) : super(key: key);\r\n\r\n  @override\r\n  Widget build(BuildContext context) {\r\n    return MaterialApp(\r\n      title: 'SpWML Example',\r\n      theme: ThemeData(\r\n        primarySwatch: Colors.green,\r\n      ),\r\n      home: const SpWMLSample(title: 'SpWML Example'),\r\n    );\r\n  }\r\n}\r\n\r\nclass SpWMLSample extends StatefulWidget {\r\n  const SpWMLSample({Key? key, required this.title}) : super(key: key);\r\n\r\n  final String title;\r\n\r\n  @override\r\n  State\u003cSpWMLSample\u003e createState() =\u003e _SpWMLSampleState();\r\n}\r\n\r\nclass _SpWMLSampleState extends State\u003cSpWMLSample\u003e {\r\n\r\n  Widget _getSpWMLWidget(BuildContext context){\r\n    return SpWMLBuilder(\"(h1)Example text\").build(context);\r\n  }\r\n\r\n  @override\r\n  Widget build(BuildContext context) {\r\n    return Scaffold(\r\n            appBar: AppBar(\r\n              title: Text(widget.title),\r\n            ),\r\n            body: _getSpWMLWidget(context)\r\n    );\r\n  }\r\n}\r\n\r\n```\r\n\r\n### Example of using inline elements\r\nPlease rewrite _getSpWMLWidget in Sample code as follows.\r\n```dart\r\n  Widget _getSpWMLWidget(BuildContext context){\r\n    return SpWMLBuilder(\"(span)\\n\"\r\n            \"+(h1,fontWeight:bold)Example\\n\"\r\n            \"+(h1,textColor:#FF0000)text\").build(context);\r\n  }\r\n```\r\n\r\n### Cooperation with Widget\r\nPlease rewrite _getSpWMLWidget in Sample code as follows.\r\n```dart\r\n  Widget _getSpWMLWidget(BuildContext context) {\r\n    SpWMLBuilder builder = SpWMLBuilder(\"(h1)Replace below this text.\\n\"\r\n            \"(block, sid:button_name)\");\r\n    builder.replace(\r\n            \"button_name\",\r\n            OutlinedButton(\r\n                    onPressed: () {\r\n                      ScaffoldMessenger.of(context).showSnackBar(const SnackBar(\r\n                        content: Text(\"The button was pressed.\"),\r\n                        duration: Duration(seconds: 3),\r\n                      ));\r\n                    },\r\n                    child: const Text(\"Flutter button\")));\r\n    return builder.build(context);\r\n  }\r\n```\r\n\r\n### Customize basic design\r\nPlease rewrite _getSpWMLWidget in Sample code as follows.\r\n```dart\r\n  Widget _getSpWMLWidget(BuildContext context) {\r\n    SpWMLFontStyle fontStyle1 = SpWMLFontStyle();\r\n    SpWMLFontStyle fontStyle2 = fontStyle1.deepCopy();\r\n    fontStyle2.styleMap[EnumSpWMLElementType.h1]!.fontWeight =\r\n            EnumFontWeight.light;\r\n    return Column(\r\n      children: [\r\n        SpWMLBuilder(\"(h1)Example text1\", spWMLStyle: fontStyle1).build(context),\r\n        SpWMLBuilder(\"(h1)Example text2\", spWMLStyle: fontStyle2).build(context),\r\n      ],\r\n    );\r\n  }\r\n```\r\nThe style can also be saved as a JSON file.  \r\nYou can create a Map with toDict and restore it with fromDict.  \r\nPlease consider if necessary.  \r\n```dart\r\n  SpWMLFontStyle test = SpWMLFontStyle.fromDict(fontStyle1.toDict());\r\n```\r\n\r\n### If you do not change the internal elements\r\nIt can be written more easily using the following wrapper widget.\r\nPlease rewrite _getSpWMLWidget in Sample code as follows.\r\n```dart\r\n  Widget _getSpWMLWidget(BuildContext context) {\r\n    return SpWML(\"(h1)Example text\");\r\n  }\r\n```\r\n\r\n## Support\r\nIf you need paid support for any reason, please contact my company.  \r\nThis package is developed by me personally, but may be supported via the company.  \r\n[SimpleAppli Inc.](https://simpleappli.com/en/index_en.html)\r\n\r\n## Format name\r\nSimple Widget Markup Language\r\n\r\n## Extension\r\n.spwml\r\n\r\n## MIME Type (Temporary)\r\ntext/x.spwml\r\n\r\n## About version control\r\nThe C part will be changed at the time of version upgrade.\r\n- Changes such as adding variables, structure change that cause problems when reading previous files.\r\n  - C.X.X\r\n- Adding methods, etc.\r\n  - X.C.X\r\n- Minor changes and bug fixes.\r\n  - X.X.C\r\n\r\n## License\r\nThis software is released under the MIT License, see LICENSE file.\r\n\r\n## Copyright notice\r\nThe “Dart” name and “Flutter” name are trademarks of Google LLC.  \r\n*The developer of this package is not Google LLC.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasahidemori-simpleappli%2Fsimple_widget_markup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasahidemori-simpleappli%2Fsimple_widget_markup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasahidemori-simpleappli%2Fsimple_widget_markup/lists"}