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

comment_box कवर
पैकेज विवरणv0.0.18

comment_box

पोस्ट और उत्पाद के लिए एक सरल Flutter टिप्पणी बॉक्स।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
461
लाइक
45
Pub अंक
130

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

flutter pub add comment_box

पैकेज अवलोकन

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

एक हल्का फ्लटर पैकेज जो पोस्ट और उत्पाद पृष्ठ में उपयोगकर्ता टिप्पणियों को एकीकृत करने के लिए एक सरल, कस्टमाइज़ेबल टिप्पणी बॉक्स प्रदान करता है। उपयोग में आसान डिज़ाइन किया गया है, जो एंड्रॉइड, आईओएस, वेब, मैकओएस, विंडोज और लिनक्स सहित कई प्लेटफॉर्मों का समर्थन करता है। इस पैकेज के द्वारा विकासकर्ता जटिल सेटअप के बिना त्वरित रूप से टिप्पणी कार्यक्षमता जोड़ सकते हैं। यह सोशल मीडिया ऐप्स, ई-कॉमर्स प्लेटफॉर्म या उपयोगकर्ता अंतरक्रिया महत्वपूर्ण होने वाले सामग्री-आधारित वेबसाइट्स के लिए आदर्श है।

उपयोग

  • ब्लॉग पोस्ट में टिप्पणियाँ जोड़ना
  • उत्पादों पर उपयोगकर्ता प्रतिक्रिया सक्षम करें
  • एप्प्स में सोशल इंटरैक्शन को एकीकृत करना
  • समुदाय चर्चा का समर्थन करना
  • इंटरैक्टिव कंटेंट फीड बनाना
  • वेब और मोबाइल पर उपयोगकर्ता एंगेजमेंट को सुगम बनाना

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

  • प्लेटफॉर्म के अनुकूलता
  • न्यूनतम सेटअप के साथ सरल एकीकरण
  • कस्टमाइज़ेबल यूआई कंपोनेंट्स
  • पाठ इनपुट और सबमिशन का समर्थन करता है
  • हल्का और तेज प्रदर्शन
  • सभी उपकरणों के लिए प्रतिक्रियाशील डिज़ाइन

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

  • सोशल फीचर्स बनाने वाले डेवलपर्स
  • ई-कॉमर्स ऐप निर्माता
  • सामग्री प्रबंधन प्रणाली एकीकरणकर्ता
  • मोबाइल और वेब ऐप टीमें
  • त्वरित टिप्पणी कार्यक्षमता की आवश्यकता वाली स्टार्टअप्स
  • उपयोगकर्ता बातचीत पर केंद्रित ऐप

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

  • प्रतिक्रियाओं या पसंद के जैसी सीमित उन्नत विशेषताएँ
  • कोई निर्मित ऑथेंटिकेशन या बैकएंड नहीं
  • डेटा स्थायित्व के लिए कस्टम बैकएंड की आवश्यकता होती है
  • बड़े पैमाने पर टिप्पणी प्रणालियों के लिए उपयुक्त नहीं
  • केवल मूल शैली विकल्प
  • बॉक्स से बाहर वास्तविक समय अपडेट नहीं होते

मूल README

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

comment_box

A simple Flutter comment box for posts and products.

Youtube Preview

IMAGE ALT TEXT HERE

Pub

Overview

Overview

Features

  • Smooth Scrolling Supported.
  • User image Supported (Local and Url).
  • Text Wrapping Supported.
  • Many more . . .

Getting started

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

dependencies:
  ...
  comment_box: ^0.0.18

In your library add the following import:

import 'package:comment_box/comment/comment.dart';

For help getting started with Flutter, view the online documentation.

Constructors

You can create a CommentBox:

CommentBox(
          userImage: CommentBox.commentImageParser(
              imageURLorPath: "assets/img/userpic.jpg"),
          child: commentChild(filedata),
          labelText: 'Write a comment...',
          errorText: 'Comment cannot be blank',
          withBorder: false,
          sendButtonMethod: () {
            if (formKey.currentState!.validate()) {
              print(commentController.text);
              setState(() {
                var value = {
                  'name': 'New User',
                  'pic':
                      'https://lh3.googleusercontent.com/a-/AOh14GjRHcaendrf6gU5fPIVd8GIl1OgblrMMvGUoCBj4g=s400',
                  'message': commentController.text,
                  'date': '2021-01-01 12:00:00'
                };
                filedata.insert(0, value);
              });
              commentController.clear();
              FocusScope.of(context).unfocus();
            } else {
              print("Not validated");
            }
          },
          formKey: formKey,
          commentController: commentController,
          backgroundColor: Colors.pink,
          textColor: Colors.white,
          sendWidget: Icon(Icons.send_sharp, size: 30, color: Colors.white),
        );
Full Example
import 'package:comment_box/comment/comment.dart';
import 'package:flutter/material.dart';

class TestMe extends StatefulWidget {
  @override
  _TestMeState createState() => _TestMeState();
}

class _TestMeState extends State<TestMe> {
  final formKey = GlobalKey<FormState>();
  final TextEditingController commentController = TextEditingController();
  List filedata = [
    {
      'name': 'Chuks Okwuenu',
      'pic': 'https://picsum.photos/300/30',
      'message': 'I love to code',
      'date': '2021-01-01 12:00:00'
    },
    {
      'name': 'Biggi Man',
      'pic': 'https://www.adeleyeayodeji.com/img/IMG_20200522_121756_834_2.jpg',
      'message': 'Very cool',
      'date': '2021-01-01 12:00:00'
    },
    {
      'name': 'Tunde Martins',
      'pic': 'assets/img/userpic.jpg',
      'message': 'Very cool',
      'date': '2021-01-01 12:00:00'
    },
    {
      'name': 'Biggi Man',
      'pic': 'https://picsum.photos/300/30',
      'message': 'Very cool',
      'date': '2021-01-01 12:00:00'
    },
  ];

  Widget commentChild(data) {
    return ListView(
      children: [
        for (var i = 0; i < data.length; i++)
          Padding(
            padding: const EdgeInsets.fromLTRB(2.0, 8.0, 2.0, 0.0),
            child: ListTile(
              leading: GestureDetector(
                onTap: () async {
                  // Display the image in large form.
                  print("Comment Clicked");
                },
                child: Container(
                  height: 50.0,
                  width: 50.0,
                  decoration: new BoxDecoration(
                      color: Colors.blue,
                      borderRadius: new BorderRadius.all(Radius.circular(50))),
                  child: CircleAvatar(
                      radius: 50,
                      backgroundImage: CommentBox.commentImageParser(
                          imageURLorPath: data[i]['pic'])),
                ),
              ),
              title: Text(
                data[i]['name'],
                style: TextStyle(fontWeight: FontWeight.bold),
              ),
              subtitle: Text(data[i]['message']),
              trailing: Text(data[i]['date'], style: TextStyle(fontSize: 10)),
            ),
          )
      ],
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Comment Page"),
        backgroundColor: Colors.pink,
      ),
      body: Container(
        child: CommentBox(
          userImage: CommentBox.commentImageParser(
              imageURLorPath: "assets/img/userpic.jpg"),
          child: commentChild(filedata),
          labelText: 'Write a comment...',
          errorText: 'Comment cannot be blank',
          withBorder: false,
          sendButtonMethod: () {
            if (formKey.currentState!.validate()) {
              print(commentController.text);
              setState(() {
                var value = {
                  'name': 'New User',
                  'pic':
                      'https://lh3.googleusercontent.com/a-/AOh14GjRHcaendrf6gU5fPIVd8GIl1OgblrMMvGUoCBj4g=s400',
                  'message': commentController.text,
                  'date': '2021-01-01 12:00:00'
                };
                filedata.insert(0, value);
              });
              commentController.clear();
              FocusScope.of(context).unfocus();
            } else {
              print("Not validated");
            }
          },
          formKey: formKey,
          commentController: commentController,
          backgroundColor: Colors.pink,
          textColor: Colors.white,
          sendWidget: Icon(Icons.send_sharp, size: 30, color: Colors.white),
        ),
      ),
    );
  }
}


श्रेणियाँ

निर्भरताएँ

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

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

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

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