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

fluttertagger कवर
पैकेज विवरणv2.3.2

fluttertagger

एक फ्लटर पैकेज जो टेक्स्टफील्ड के विस्तार के लिए अनुमति देता है जिससे टैगिंग क्षमता (उपयोगकर्ता उल्लेख, हैशटैग आदि) प्रदान की जा सकती है।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
15 हज़ार
लाइक
96
Pub अंक
160

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

flutter pub add fluttertagger

पैकेज अवलोकन

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

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

उपयोग

  • सोशल मीडिया कमेंट सेक्शन
  • उपयोगकर्ता उल्लेख प्रणाली
  • पोस्ट में हैशटैग ट्रैकिंग
  • रियल-टाइम चैट एप्लिकेशन्स
  • फॉर्म में कंटेंट टैगिंग
  • इंटरैक्टिव टेक्स्ट संपादन

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

  • रियल-टाइम टैग पहचान
  • कस्टमाइज़ेबल टैग स्टाइलिंग
  • सुझाव ड्रॉपडाउन एंटीग्रेशन
  • प्लेटफॉर्म के अनुकूलता
  • टैग कार्रवाई के लिए इवेंट कॉलबैक
  • विस्तार्य टेक्स्टफील्ड वрапर

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

  • सोशल फीचर्स बनाने वाले डेवलपर्स
  • उपयोगकर्ता टैगिंग की आवश्यकता वाले ऐप्स
  • संदेश या फोरम एप्लिकेशन
  • सामग्री निर्माण उपकरणों के लिए प्लगइन
  • इंटरैक्टिव टेक्स्ट इनपुट की आवश्यकता वाले प्रोजेक्ट्स

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

  • पाठ चयन का सावधानीपूर्वक उपचार आवश्यक है
  • जटिल टैग पार्सिंग के लिए कस्टम लॉजिक की आवश्यकता हो सकती है
  • बड़े टैग सूचियों का प्रदर्शन प्रभाव
  • सीमित निर्मित वैधता
  • सही अवस्था प्रबंधन पर निर्भर करता है
  • टैगिंग के बाहर समृद्ध पाठ संपादन के लिए नहीं डिज़ाइन किया गया है

मूल README

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

FlutterTagger

FlutterTagger

likes pub points code coverage

FlutterTagger is a Flutter package that allows for the extension of TextFields to provide tagging capabilities. A typical use case is in social apps where user mentions and hashtags features are desired.

Install 🚀

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  fluttertagger: ^2.3.2

Import the package in your project 📥

import 'package:fluttertagger/fluttertagger.dart';

Usage 🏗️

FlutterTagger(
          controller: flutterTaggerController,
          onSearch: (query, triggerCharacter) {
              //perform search
          },
          //characters that can trigger a search and the styles
          //to be applied to their tagged results in the TextField
          triggerCharacterAndStyles: const {
            '@': TextStyle(color: Colors.pinkAccent),
            '#': TextStyle(color: Colors.blueAccent),
          },
          //this will cause the onSearch callback to be invoked
          //immediately a trigger character is detected.
          //The default behaviour defers the onSearch invocation
          //until a searchable character has been entered after
          //the trigger character.
          triggerStrategy: TriggerStrategy.eager,
          overlay: SearchResultView(),
          builder: (context, textFieldKey) {
              //return a TextField and pass it `textFieldKey`
              return TextField(
                    key: textFieldKey,
                    controller: flutterTaggerController,
                    suffix: IconButton(
                      onPressed: () {
                        //get formatted text from controller
                        final text = flutterTaggerController.formattedText;

                        //perform send action...

                        FocusScope.of(context).unfocus();
                        flutterTaggerController.clear();
                      },
                    icon: const Icon(
                      Icons.send,
                      color: Colors.redAccent,
                    ),
                  ),
                );
          },
        )

Here's how trigger a search by updating the controller directly instead of typing into a keyboard:

FlutterTagger(
          controller: flutterTaggerController,
          onSearch: (query, triggerCharacter) {
              //perform search
          },
          //characters that can trigger a search and the styles
          //to be applied to their tagged results in the TextField
          triggerCharacterAndStyles: const {
            '@': TextStyle(color: Colors.pinkAccent),
            '#': TextStyle(color: Colors.blueAccent),
          },
          overlay: SearchResultView(),
          builder: (context, textFieldKey) {
              // return a TextField and pass it `textFieldKey`
              return TextField(
                    key: textFieldKey,
                    controller: flutterTaggerController,
                    suffix: IconButton(
                      onPressed: () {
                        // get formatted text from controller
                        String text = flutterTaggerController.formattedText;

                        // append a trigger character to activate the search context
                        flutterTaggerController.text = text += '#';

                        // update text selection
                        flutterTaggerController.selection = TextSelection.fromPosition(
                          TextPosition(offset: flutterTaggerController.text.length),
                        );

                        // append other characters to trigger search
                        flutterTaggerController.text = text += 'f';

                        // update text selection
                        flutterTaggerController.selection = TextSelection.fromPosition(
                          TextPosition(offset: flutterTaggerController.text.length),
                        );

                        // then call formatTags on the controller to preserve formatting
                        flutterTaggerController.formatTags();
                      },
                    icon: const Icon(
                      Icons.send,
                      color: Colors.redAccent,
                    ),
                  ),
                );
          },
        )

Explore detailed example demo here.

Demo 📷

Example demo

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.

श्रेणियाँ

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

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

अभी कोई डेटा उपलब्ध नहीं है।