From 40330ad1af07a412d66c446052da6e9e3260c2e4 Mon Sep 17 00:00:00 2001 From: JohnE Date: Mon, 6 Oct 2025 20:33:03 -0700 Subject: [PATCH] NEW: 'linkify' all around, no more confusion, you dirty dogs --- example/lib/main.dart | 3 ++- example/pubspec.lock | 4 ++-- example/pubspec.yaml | 2 +- lib/{linkfy_text.dart => linkify_text.dart} | 2 +- lib/src/linkify.dart | 6 +++--- lib/src/model/link.dart | 4 ++-- lib/src/utils/regex.dart | 2 +- test/utils/regex_test.dart | 4 ++-- 8 files changed, 14 insertions(+), 13 deletions(-) rename lib/{linkfy_text.dart => linkify_text.dart} (86%) diff --git a/example/lib/main.dart b/example/lib/main.dart index e2748df..b25b139 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:linkfy_text/linkfy_text.dart'; +import 'package:linkify_text/linkify_text.dart'; + void main() { runApp(const MyApp()); diff --git a/example/pubspec.lock b/example/pubspec.lock index ae2a873..980b3f5 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -139,13 +139,13 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.2" - linkfy_text: + linkify_text: dependency: "direct main" description: path: ".." relative: true source: path - version: "1.1.6" + version: "1.2.1" lints: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 542e21e..eee5f29 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: flutter: sdk: flutter google_fonts: ^6.2.1 - linkfy_text: + linkify_text: path: ../ # The following adds the Cupertino Icons font to your application. diff --git a/lib/linkfy_text.dart b/lib/linkify_text.dart similarity index 86% rename from lib/linkfy_text.dart rename to lib/linkify_text.dart index fc1251b..10525d1 100644 --- a/lib/linkfy_text.dart +++ b/lib/linkify_text.dart @@ -1,5 +1,5 @@ /// A lightweight flutter package to linkify texts containing urls, emails and hashtags. -library linkfy_text; +library linkify_text; export 'src/enum.dart'; export 'src/linkify.dart'; diff --git a/lib/src/linkify.dart b/lib/src/linkify.dart index 4207505..5db0618 100644 --- a/lib/src/linkify.dart +++ b/lib/src/linkify.dart @@ -2,9 +2,9 @@ import 'dart:ui' as ui show BoxHeightStyle, BoxWidthStyle; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:linkfy_text/src/enum.dart'; -import 'package:linkfy_text/src/model/link.dart'; -import 'package:linkfy_text/src/utils/regex.dart'; +import 'package:linkify_text/src/enum.dart'; +import 'package:linkify_text/src/model/link.dart'; +import 'package:linkify_text/src/utils/regex.dart'; /// Linkify [text] containing urls, emails or hashtag class LinkifyText extends StatelessWidget { diff --git a/lib/src/model/link.dart b/lib/src/model/link.dart index bcbd251..81a6600 100644 --- a/lib/src/model/link.dart +++ b/lib/src/model/link.dart @@ -1,5 +1,5 @@ -import 'package:linkfy_text/src/enum.dart'; -import 'package:linkfy_text/src/utils/regex.dart'; +import 'package:linkify_text/src/enum.dart'; +import 'package:linkify_text/src/utils/regex.dart'; class Link { late final String? _value; diff --git a/lib/src/utils/regex.dart b/lib/src/utils/regex.dart index cd165d0..6d4a1f7 100644 --- a/lib/src/utils/regex.dart +++ b/lib/src/utils/regex.dart @@ -1,4 +1,4 @@ -import 'package:linkfy_text/src/enum.dart'; +import 'package:linkify_text/src/enum.dart'; // url regex that accept https, http, www, subdomains, ports and paths String urlRegExp = diff --git a/test/utils/regex_test.dart b/test/utils/regex_test.dart index 6ec74da..0fa593c 100644 --- a/test/utils/regex_test.dart +++ b/test/utils/regex_test.dart @@ -1,5 +1,5 @@ -import 'package:linkfy_text/src/enum.dart'; -import 'package:linkfy_text/src/utils/regex.dart'; +import 'package:linkify_text/src/enum.dart'; +import 'package:linkify_text/src/utils/regex.dart'; import 'package:test/test.dart'; void main() {