पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

linkfy_text कवर
पैकेज विवरणv1.1.6

linkfy_text

एक हल्का फ्लटर पैकेज जो URL, ईमेल और हैशटैग वाले टेक्स्ट को लिंक करता है, जैसे ट्विटर करता है।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
2.1 हज़ार
लाइक
194
Pub अंक
140

पैकेज इंस्टॉल करें

flutter pub add linkfy_text

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

LinkfyText एक हल्का Flutter पैकेज है जो स्वचालित रूप से टेक्स्ट में URL, ईमेल और हैशटैग की पहचान करता है और उन्हें क्लिक करने योग्य लिंक में बदलता है, जैसे कि ट्विटर के लिंकिंग व्यवहार की नकल करता है। इससे उपयोगकर्ता अनुभव को बढ़ाया जाता है, जिससे टेक्स्ट इंटरैक्शन स्वचालित रूप से आसान हो जाता है बिना हाथ से लिंक फॉर्मेटिंग के। यह पैकेज Android, iOS, Web, macOS, Windows और Linux जैसे कई प्लेटफॉर्म का समर्थन करता है, जिससे डिवाइस के बीच समान कार्यक्षमता सुनिश्चित होती है। सोशल मीडिया ऐप्स, चैट इंटरफेस या किसी भी ऐप के लिए आदर्श जिसमें डायनामिक टेक्स्ट लिंकिंग की आवश्यकता हो।

उपयोग

  • सोशल मीडिया फीड्स
  • चैट एप्लिकेशन्स
  • उपयोगकर्ता द्वारा उत्पन्न सामग्री प्रदर्शन
  • ईमेल और URL निकालना
  • हैशटैग नेविगेशन

मुख्य विशेषताएँ

  • स्वचालित URL निर्धारण
  • ईमेल लिंकिफिकेशन
  • हैशटैग को क्लिक करने योग्य टैग में बदलें
  • क्रॉस-प्लेटफ़ॉर्म समर्थन
  • हल्का और तेज़

इनके लिए उपयुक्त

  • समृद्ध पाठ सामग्री वाले ऐप
  • उपयोगकर्ता इनपुट के साथ इंटरैक्टिव यूआई
  • सामग्री-भारी इंटरफेस
  • रियल-टाइम संदेश एप्लिकेशन
  • न्यूनतम डिज़ाइन के साथ डायनामिक टेक्स्ट

विचार योग्य बातें

  • जटिल थीम के लिए कस्टम स्टाइलिंग की आवश्यकता हो सकती है
  • मूलभूत लिंक प्रकारों तक सीमित (उल्लेख या कस्टम पैटर्न नहीं)
  • बहुत लंबे पाठ के लिए प्रदर्शन प्रभाव
  • निर्मित नेस्टेड लिंक का कोई समर्थन नहीं है
  • निर्धारण के लिए बाहरी नियमित व्यंजक पैटर्न पर निर्भर करता है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

linkfy_text

Lightweight flutter package that detects linkable patterns(urls, emails, hashtags, etc) in a text and makes them clickable. It also allows you to customize the style of the linkified text and the link itself. It also allows you to choose what type of link to linkify in a text.¬

pub package CI coverage Status

Usage

To use this package, add linkfy_text as a dependency in your pubspec.yaml file.

Example:

// first import the package
import 'package:linkfy_text/linkify_text.dart';

Container(
    child: LinkifyText(
    "This text contains a url: https://flutter.dev",
    linkStyle: TextStyle(color: Colors.blue),
    onTap: (link) {
        /// do stuff with `link`
        },
    );
)

Be default, The above snippet would linkify all urls in the string, you can choose what type of link to linkify by passing the LinkTypes parameter

Container(
    child: LinkifyText(
    "This text contains a url: https://flutter.dev and #flutter",
    linkStyle: TextStyle(color: Colors.blue),
    LinkTypes: [LinkType.url, LinkType.hashtag]
    onTap: (link) {
        /// do stuff with `link` like
        /// if(link.type == Link.url) launchUrl(link.value);
        },
    );
)

API Reference

LinkfyText
Parameter Type Description
textStyle TextStyle style applied to the text
linkStyle TextStyle style applied to the linkified text. defaults to textStyle
LinkTypes List<LinkType> a list of LinkType used to override the links to be linkified in a text either a url, hashtag or email. defaults to [LinkTypes.url]
onTap Function(Link) function called when a link is pressed
LinkType
Parameter Type Description
type Link the link type either url, email or hashtag, @mention
value String value the link holds

Contributions

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.
If you fixed a bug or implemented a feature, please send a pull request.

TODO

  • LinkifyTextField widget

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 1 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट