{"id":19858577,"url":"https://github.com/danreynolds/rich_text_composer","last_synced_at":"2026-02-14T11:32:03.088Z","repository":{"id":195457059,"uuid":"692950198","full_name":"danReynolds/rich_text_composer","owner":"danReynolds","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-18T14:13:01.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-18T14:53:27.747Z","etag":null,"topics":["flutter","hacktoberfest","richtext"],"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/danReynolds.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-18T03:17:45.000Z","updated_at":"2024-11-11T08:44:39.000Z","dependencies_parsed_at":"2025-01-11T14:26:12.885Z","dependency_job_id":"a0702c93-de0d-4b99-9231-cadf75acf38f","html_url":"https://github.com/danReynolds/rich_text_composer","commit_stats":null,"previous_names":["danreynolds/rich_text_composer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danReynolds/rich_text_composer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danReynolds%2Frich_text_composer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danReynolds%2Frich_text_composer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danReynolds%2Frich_text_composer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danReynolds%2Frich_text_composer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danReynolds","download_url":"https://codeload.github.com/danReynolds/rich_text_composer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danReynolds%2Frich_text_composer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29443452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T10:51:12.367Z","status":"ssl_error","status_checked_at":"2026-02-14T10:50:52.088Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","hacktoberfest","richtext"],"created_at":"2024-11-12T14:24:00.120Z","updated_at":"2026-02-14T11:32:03.070Z","avatar_url":"https://github.com/danReynolds.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rich text composer\n\nSometimes `RichText` composing is easier with pattern matching. `RichTextComposer` turns composition like this:\n\n```dart\nRichText(\n  text: TextSpan(\n    children: [\n      TextSpan(\"The forecast for today is \", style: TextStyle(color: Colors.black)),\n      TextSpan(weatherType, style: TextStyle(fontWeight: FontWeight.bold)),\n      TextSpan(\" with a high of \", style: TextStyle(color: Colors.black)),\n      TextSpan(temperatureMax, style: TextStyle(color: Colors.red)),\n    ]\n  )\n)\n```\n\ninto this:\n\n```dart\nRichTextComposer(\n  text: \"The forecast for today is @weatherType with a high of @high\",\n  richTextBuilders: [\n    RichTextPatternBuilder(\n      pattern: RegExp('@weatherType'),\n      builder: (\n        text, {\n        required endIndex,\n        required matchIndex,\n        required startIndex,\n      }) {\n        return TextSpan(text: weatherType, style: TextStyle(fontWeight: FontWeight.bold));\n      },\n    ),\n    RichTextPatternBuilder(\n      pattern: RegExp('@high'),\n      builder: (\n        text, {\n        required endIndex,\n        required matchIndex,\n        required startIndex,\n      }) {\n        return TextSpan(text: high, style: TextStyle(color: Colors.red));\n      },\n    ),\n  ],\n  plainTextBuilder: (text) =\u003e TextSpan(\n    text: text,\n    style: TextStyle(color: Colors.black)\n  ),\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanreynolds%2Frich_text_composer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanreynolds%2Frich_text_composer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanreynolds%2Frich_text_composer/lists"}