{"id":23125447,"url":"https://github.com/nialixus/richtrex_span","last_synced_at":"2025-04-04T05:11:10.413Z","repository":{"id":38450833,"uuid":"504999164","full_name":"Nialixus/richtrex_span","owner":"Nialixus","description":"An extended package of RichTrex package which is used to encode TextSpan into String, and decode String into TextSpan.","archived":false,"fork":false,"pushed_at":"2022-11-28T07:26:37.000Z","size":190,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T17:06:39.735Z","etag":null,"topics":["dart","flutter","flutter-package","pub-dev","wysiwyg"],"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/Nialixus.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":"2022-06-19T03:02:34.000Z","updated_at":"2022-11-23T08:56:48.000Z","dependencies_parsed_at":"2023-01-23T17:16:20.216Z","dependency_job_id":null,"html_url":"https://github.com/Nialixus/richtrex_span","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nialixus%2Frichtrex_span","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nialixus%2Frichtrex_span/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nialixus%2Frichtrex_span/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nialixus%2Frichtrex_span/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nialixus","download_url":"https://codeload.github.com/Nialixus/richtrex_span/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123107,"owners_count":20887261,"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-package","pub-dev","wysiwyg"],"created_at":"2024-12-17T08:13:40.347Z","updated_at":"2025-04-04T05:11:10.399Z","avatar_url":"https://github.com/Nialixus.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# RichTrex: Span\n\u003ca href='https://pub.dev/packages/richtrex_span'\u003e\u003cimg src='https://img.shields.io/pub/v/richtrex_span.svg?logo=flutter\u0026color=blue\u0026style=flat-square'/\u003e\u003c/a\u003e\\\n\\\nAn extended package of `RichTrex` package which is used to encode list of `TextSpan` into `String`, and decode `String` into list of `TextSpan`.\n\n## Preview\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"https://user-images.githubusercontent.com/45191605/175512465-5025e618-99c5-4638-99d6-709e5fafb569.png\"/\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"https://user-images.githubusercontent.com/45191605/175517176-bd5041a8-c1ec-4b04-a4d4-346758875420.png\"/\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Primary Feature\n\n- Font Color ✅\n- Font Weight ✅\n- Font Size ✅\n- Font Family ✅\n- Custom ❌\n- Italic ✅\n- Underline ✅\n- Strikethrough ✅\n- Background Color ✅\n- Image ✅\n- Alignment ✅\n- Ordered List ❌\n- Unordered List ❌\n- Block Quote ✅\n- Hyperlink ✅\n\n## Secondary Feature\n\n- Superscript ❌\n- Subscript ❌\n- Shadow ✅\n- Vertical Space ✅\n- Horizontal Space ✅\n- Overline ✅\n- Padding ✅\n- Table ❌\n- Video ❌\n\n\n## Install\n\nAdd this line to your pubspec.yaml.\n\n```yaml\ndependencies:\n  richtrex_span: ^1.2.0\n```\n\n## Usage\n\nFirst, import the RichTrex: Span package.\n\n```dart\nimport 'package:richtrex_span/richtrex_span.dart';\n```\n\nAnd to encode, you need to set a list of `RichTrexSpan` just like this.\n\n```dart\nconst List\u003cRichTrexSpan\u003e span = [\n    RichTrexSpan(\n        text: \"RichTrex: Format\",\n        fontWeight: FontWeight.bold,\n        fontSize: 25,\n        align: Alignment.center),\n    RichTrexSpan(\n        text: \"\\n This is an Example of using RichTrexFormat.\")\n  ];\n\n  String result = RichTrex.encode(span);\n```\n\nor if you want to decode list of `RichTrexSpan` from `String` you can use this.\n\n```dart\nString text =  \"\"\"\u003cstyle=\"font-weight:6;font-size:25.0;align-x:0.0;align-y:0.0;\"\u003eRichTrex: Format\u003c/style\u003e\nThis is an Example of using RichTrexFormat.\"\"\";\n\nList\u003cRichTrexSpan\u003e result = RichTrex.decode(text);\n```\n\nand implement the decoded result into `Text.rich` just like this.\n\n```dart\nreturn Text.rich(\n          TextSpan(children: RichTrexSpan.decode(text)),\n          key: UniqueKey(),\n        );\n```\n\n## Codelist\n\n\u003ctable\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003cb\u003eDefinition\u003c/b\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cb\u003eRichTrexSpan\u003c/b\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cb\u003eString\u003c/b\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eAlignment\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text: \"value\", align: Alignment.center)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"align-x:0.0;align-y:0.0;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eBackground Color\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text:\"value\", backgroundColor: Colors.red)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"background-color:0xFFF44336;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eBlockquote\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text:\"value\", blockquote: true)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"decoration:blockquote;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eColor\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text:\"value\", color: Colors.red)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"font-color:0xFFF44336;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eFont Family\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text: \"value\", fontFamily: \"Dancing\")\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"font-family:Dancing;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eFont Size\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text:\"value\", fontSize: 30.0)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"font-size:30;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eFont Weight\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text: \"value\", fontWeight: FontWeight.bold)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"font-weight:6;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eHorizontal Space\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text:\"value\", horizontalSpace: 10.0)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"horizontal-space:10;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eHyperlink\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text: \"value\", hyperlink: \"https://github.com/Nialixus\")\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"hyperlink:https://github.com/Nialixus;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eImage\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan.image(image: RichTrexImage.network(\"https://avatars.githubusercontent.com/u/45191605?v=4\", size: Size(70, 70)))\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\u0026lt;widget=\"image-network:https://avatars.githubusercontent.com/u/45191605?v=4;image-width:70;image-height:70;\"/\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eItalic\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text: \"value\", italic: true)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"decoration:italic;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eOverline\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text: \"value\", overline: true)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"decoration:overline;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003ePadding\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text: \"value\", padding: EdgeInsets.all(20.0))\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"padding-left:20.0;padding-top:20.0;padding-right:20.0;padding-bottom:20.0;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eShadow\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text: \"value\", shadow: Shadow(color: Colors.red, blurRadius: 10, offset: Offset(-1, -1)))\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"shadow-color:0xFFF44336;shadow-blur:10.0;shadow-vertical:-1.0;shadow-horizontal:-1.0;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eStrikethrough\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text: \"value\", strikeThrough: true)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"decoration:strikethrough;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eUnderline\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text: \"value\", underline: true)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"decoration:underline;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\u003ctd\u003eVertical Space\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\tRichTrexSpan(text:\"value\", verticalSpace: 10.0)\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ccode\u003e\n\t\t\t\t\u0026lt;style=\"vertical-space:10;\"\u0026gt;value\u0026lt;/style\u0026gt;\n\t\t\t\u003c/code\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\u003c/table\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnialixus%2Frichtrex_span","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnialixus%2Frichtrex_span","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnialixus%2Frichtrex_span/lists"}