{"id":16401938,"url":"https://github.com/festelo/native_linkify","last_synced_at":"2025-04-21T11:33:15.971Z","repository":{"id":56835235,"uuid":"459763056","full_name":"festelo/native_linkify","owner":"festelo","description":"Flutter plugin which helps you to find links in String using NSDataDetector and Linkify","archived":false,"fork":false,"pushed_at":"2022-02-15T21:58:25.000Z","size":514,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-12T05:44:32.161Z","etag":null,"topics":["dart","flutter","linkify"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/native_linkify","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/festelo.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-02-15T21:56:58.000Z","updated_at":"2022-11-29T09:46:36.000Z","dependencies_parsed_at":"2022-09-07T17:34:43.049Z","dependency_job_id":null,"html_url":"https://github.com/festelo/native_linkify","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/festelo%2Fnative_linkify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/festelo%2Fnative_linkify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/festelo%2Fnative_linkify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/festelo%2Fnative_linkify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/festelo","download_url":"https://codeload.github.com/festelo/native_linkify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223861193,"owners_count":17215837,"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","linkify"],"created_at":"2024-10-11T05:44:34.514Z","updated_at":"2024-11-09T17:35:03.509Z","avatar_url":"https://github.com/festelo.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp\u003e\n\u003ca href=\"https://github.com/festelo/native_linkify/actions\"\u003e\u003cimg src=\"https://github.com/festelo/native_linkify/actions/workflows/tests.yml/badge.svg\" alt=\"Build \u0026 Test\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/festelo/native_linkify\"\u003e\u003cimg src=\"https://codecov.io/gh/festelo/native_linkify/branch/master/graph/badge.svg\" alt=\"codecov\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-Apache_2.0-blue.svg\" alt=\"License: Apache 2.0\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Flutter's Native Linkify\n![Example screenshot](resources/screenshot.png)\n\n`native_linkify` is a Flutter plugin. Use it to find links in plain-text. \n\nThe plugin uses [NSDataDetector](https://developer.apple.com/documentation/foundation/nsdatadetector) for iOS and macOS; [Linkify](https://developer.android.com/reference/android/text/util/Linkify) for Android. This means the plugin finds links in the same way most native apps do, giving much more accurate results than existing pure dart packages.\n\nThis plugin doesn't have any widgets to show inline links out of the box, but it has everything you need to create them in a way you like.\n\nHere's example which shows how to implement widget that's turns text URLs, E-Mails and phones into clickable links:\n```dart\n\nimport 'package:flutter/gestures.dart';\nimport 'package:flutter/material.dart';\n\nimport 'package:url_launcher/url_launcher.dart';\nimport 'package:native_linkify/native_linkify.dart';\n\nvoid main() async {\n  WidgetsFlutterBinding.ensureInitialized();\n  final entries = await NativeLinkify.linkify(\n      'text link.com some@mail.com and +79990000000');\n  // Note that this method is asynchronous because the plugin works with native\n  // functions via MethodChannel and MethodChannel works only in asynchronous way\n  // in real app it's better to linkify text at the place where you load it from\n  // your data source\n  runApp(\n    MyApp(\n      entries: entries,\n    ),\n  );\n}\n\nclass MyApp extends StatelessWidget {\n  const MyApp({Key? key, required this.entries}) : super(key: key);\n\n  final List\u003cLinkifyEntry\u003e entries;\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: SafeArea(\n          child: Text.rich(\n            TextSpan(\n              children: [\n                for (final l in entries)\n                  if (l is LinkifyText)\n                    // Regular text, text without links\n                    TextSpan(\n                      text: l.text,\n                    )\n                  else if (l is LinkifyUrl)\n                    // Link\n                    TextSpan(\n                      text: l.text,\n                      style: const TextStyle(color: Colors.blue),\n                      recognizer: TapGestureRecognizer()\n                        ..onTap = () =\u003e launch(l.url),\n                    )\n              ],\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffestelo%2Fnative_linkify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffestelo%2Fnative_linkify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffestelo%2Fnative_linkify/lists"}