{"id":13491289,"url":"https://github.com/santa112358/detectable_text_field","last_synced_at":"2026-02-21T16:02:19.489Z","repository":{"id":45613435,"uuid":"320058795","full_name":"santa112358/detectable_text_field","owner":"santa112358","description":"TextField and Text widget with detection features. You can detect hashtags, at sign, or anything you want.","archived":false,"fork":false,"pushed_at":"2024-06-27T07:43:42.000Z","size":442,"stargazers_count":43,"open_issues_count":13,"forks_count":46,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-01T14:11:20.878Z","etag":null,"topics":["textfield","twitter"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/detectable_text_field","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/santa112358.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":"2020-12-09T19:28:58.000Z","updated_at":"2025-05-31T09:31:00.000Z","dependencies_parsed_at":"2023-12-04T05:28:26.829Z","dependency_job_id":"5c19c2ef-83b6-4ec1-8edb-092fe30f435c","html_url":"https://github.com/santa112358/detectable_text_field","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/santa112358/detectable_text_field","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santa112358%2Fdetectable_text_field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santa112358%2Fdetectable_text_field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santa112358%2Fdetectable_text_field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santa112358%2Fdetectable_text_field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santa112358","download_url":"https://codeload.github.com/santa112358/detectable_text_field/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santa112358%2Fdetectable_text_field/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29685040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["textfield","twitter"],"created_at":"2024-07-31T19:00:55.268Z","updated_at":"2026-02-21T16:02:19.451Z","avatar_url":"https://github.com/santa112358.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# detectable_text_field\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-11-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n[![pub package](https://img.shields.io/pub/v/detectable_text_field.svg)](https://pub.dev/packages/detectable_text_field) \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-purple.svg\" alt=\"License: MIT\"\u003e\u003c/a\u003e\n\nText widgets with detection features. You can detect hashtags, at sign, url, or anything you want.\nHelps you develop Twitter like app.\n\nRefinement of [hashtagable](https://pub.dev/packages/hashtagable).\n\n![final](https://user-images.githubusercontent.com/43510799/104180838-2385fd80-5451-11eb-8506-1640b4ea829f.gif)\n\n## Usage\n\n### DetectableTextField\n\n```dart\n    DetectableTextField(\n      detectionRegExp: detectionRegExp(),\n      detectedStyle: TextStyle(\n        fontSize: 20,\n        color: Colors.blue,\n      ),\n    )\n```\n\n- `detectionRegExp` decides the text to detect.\n- `detectedStyle` is the textStyle for detected text.\n\n### DetectableTextEditingController\n\nDetectableTextEditingController allows you to listen to the `typingDetection`. Ideal for features\nlike live hashtag or mention detection.\n\n```dart\n\n    final controller = DetectableTextEditingController(\n      regExp: detectionRegExp(),\n    );\n    \n    @override\n    void initState() {\n      super.initState();\n      controller.addListener(() {\n        setState(() {});\n      });\n    }\n    \n    @override\n    Widget build(BuildContext context) {\n      return Column(\n        mainAxisSize: MainAxisSize.min,\n        mainAxisAlignment: MainAxisAlignment.center,\n        children: \u003cWidget\u003e[\n          Text(\n            'Typing detection: ${controller.typingDetection}',\n          ),\n          DetectableTextField(\n            controller: controller,\n          ),\n        ],\n      );\n    }\n```\n\n`DetectableTextEditingController` extends `TextEditingController`, so you can use it\nwith `TextField`, `TextFormField` or any other widgets that accept `TextEditingController`.\n\nIf you use flutter_hooks, `useDetectableTextEditingController` is also available.\n\n\n\n\n### DetectableText\n\nIf you want to use detection feature in the text only to display, use `DetectableText`.\n\n```dart\n    DetectableText(\n      text: \"#HashTag and @AtSign and https://pub.dev/packages/detectable_text_field\",\n      detectionRegExp: detectionRegExp(),\n      detectedStyle: TextStyle(\n        fontSize: 20,\n        color: Colors.blue,\n      ),\n      basicStyle: TextStyle(\n        fontSize: 20,\n      ),\n      onTap: (tappedText){\n        print(tappedText);\n      },\n    )\n```\n\nUsage of the arguments like `detectionRegExp` are same as the ones in `DetectableTextField`.\n\nThe argument `onTap(String)` is called when user tapped a detected text.\n\n### `detectionRegExp()`\n\nThe widgets and methods in this package is expected to be used with RegExp.\n\nThe function `detectionRegExp()` returns sample regExp depending on the boolean arguments: `hashtag`\n, `atSign`, and `url`.They are all true by default.\n\nIf you see\nthe [API reference](https://pub.dev/documentation/detectable_text_field/latest/detector_sample_regular_expressions/detectionRegExp.html)\n, you will see the function just returns the sample regular expressions below. You can use them\ndirectly if you want.\n\n| sample regExp | hashtag | atSign | url |\n| --- | --- | --- | ---- |\n| `hashTagRegExp` |○|×|×|\n| `atSignRegExp`|×|○|×|\n| `urlRegExp`|×|×|○|\n| `hashTagAtSignRegExp`|○|○|×|\n| `hashTagUrlRegExp`|○|×|○|\n| `AtSignUrlRegExp`|×|○|○|\n| `hashTagAtSignUrlRegExp`|○|○|○|\n\n- The detection rules are almost same as X(formally twitter).\n    1. It needs space before `#` or `@`.\n    2. It stops `#` and `@` detection if there's emoji or symbol.\n\n\u003cimg src =\"https://user-images.githubusercontent.com/43510799/93002102-3655f780-f56f-11ea-8193-1753a69e23bc.jpg\" width = \"265\"/\u003e\n\n- The examples currently support six languages: English, Japanese, Korean, Spanish, Arabic, and\n  Thai.\n\n### Customize with useful functions\n\n- Check if there are detections\n\n```dart\n  print(isDetected(\"Hello #World\", hashTagRegExp));\n// true\n\n  print(isDetected(\"Hello World\", hashTagRegExp));\n// false\n\n```\n\n- Extract detections from text\n\n```dart\n\n  final List\u003cString\u003e detections = extractDetections(\n    \"#Hello World #Flutter Dart #Thank you\", \n    hashTagRegExp,\n  );\n  // [\"#Hello\", \"#Flutter\", \"#Thank\"]\n\n```\n\nIf you have any requests or questions, please feel free to ask\non [github](https://github.com/santa112358/detectable_text_field/issues).\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/santa112358\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/43510799?v=4?s=100\" width=\"100px;\" alt=\"Santa Takahashi\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSanta Takahashi\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/santa112358/detectable_text_field/commits?author=santa112358\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.facebook.com/Paresh.07.OCT\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/10085177?v=4?s=100\" width=\"100px;\" alt=\"Paresh Patil\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eParesh Patil\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/santa112358/detectable_text_field/commits?author=Pareshoct7\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/jtmuller5\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/47997351?v=4?s=100\" width=\"100px;\" alt=\"Joseph Muller\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJoseph Muller\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/santa112358/detectable_text_field/commits?author=jtmuller5\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/EsteveAguilera\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/6932449?v=4?s=100\" width=\"100px;\" alt=\"Esteve Aguilera\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eEsteve Aguilera\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/santa112358/detectable_text_field/commits?author=EsteveAguilera\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/MATTYGILO\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/34808802?v=4?s=100\" width=\"100px;\" alt=\"MATTYGILO\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMATTYGILO\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/santa112358/detectable_text_field/commits?author=MATTYGILO\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://add00w.github.io\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/35359329?v=4?s=100\" width=\"100px;\" alt=\"Abdullahi A. Addow\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAbdullahi A. Addow\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/santa112358/detectable_text_field/commits?author=Add00w\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/rlee1990\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/21372502?v=4?s=100\" width=\"100px;\" alt=\"Social Jawn\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSocial Jawn\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/santa112358/detectable_text_field/commits?author=rlee1990\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/xuxiaowei13\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/10124443?v=4?s=100\" width=\"100px;\" alt=\"xuxiaowei13\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003exuxiaowei13\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/santa112358/detectable_text_field/commits?author=xuxiaowei13\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.debuggerx.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/19624835?v=4?s=100\" width=\"100px;\" alt=\"debuggerx01\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003edebuggerx01\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/santa112358/detectable_text_field/commits?author=debuggerx01\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/furukaze-akane\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/87937371?v=4?s=100\" width=\"100px;\" alt=\"furukaze-akane\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003efurukaze-akane\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/santa112358/detectable_text_field/commits?author=furukaze-akane\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/drown0315\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/108989782?v=4?s=100\" width=\"100px;\" alt=\"drown0315\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003edrown0315\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/santa112358/detectable_text_field/commits?author=drown0315\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors)\nspecification. Contributions of any kind welcome!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanta112358%2Fdetectable_text_field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanta112358%2Fdetectable_text_field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanta112358%2Fdetectable_text_field/lists"}