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

पैकेज विवरणv0.0.3

icon_file

एक फ्लटर विजेट जो एक्सटेंशन के साथ फ़ाइल आइकन दिखाता है।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
54
लाइक
2
Pub अंक
150

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

flutter pub add icon_file

पैकेज अवलोकन

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

icon_file एक Flutter पैकेज है जो फ़ाइल एक्सटेंशन के आधार पर फ़ाइल आइकन दिखाने के लिए एक विजेट प्रदान करता है। यह एंड्रॉइड, iOS, वेब, macOS, Windows और Linux सहित कई प्लेटफ़ॉर्मों पर विभिन्न फ़ाइल प्रकार के दृश्य प्रतिनिधित्व दिखाने की प्रक्रिया को सरल बनाता है। विजेट स्वचालित रूप से .pdf, .jpg, .txt और अधिक जैसे सामान्य एक्सटेंशन के लिए उपयुक्त आइकन चुनता है, जिससे फ़ाइल-आधारित एप्लिकेशन में उपयोगकर्ता इंटरफ़ेस की स्पष्टता बढ़ती है। यह हल्का है और न्यूनतम कॉन्फ़िगरेशन के साथ आसानी से एकीकृत किया जा सकता है।

उपयोग

  • फ़ाइल एक्सप्लोरर में फ़ाइल प्रकार दिखाना
  • दृश्य संकेतों के साथ दस्तावेज़ सूचियों को बढ़ावा देना
  • बादल स्टोरेज ऐप में यूआई में सुधार करना
  • अपलोड इंटरफेस में फ़ाइल प्रारूप दिखाएं
  • प्रोजेक्ट प्रबंधन उपकरणों में विजुअल फीडबैक

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

  • फ़ाइल एक्सटेंशन द्वारा स्वचालित आइकन चयन
  • बहुपлатफॉर्म समर्थन
  • हल्का और आसान एकीकरण
  • कस्टमाइज़ किए गए आइकन आकार और रंग
  • सामान्य फ़ाइल प्रकारों के लिए पूर्वनिर्धारित आइकन

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

  • फ़ाइल प्रबंधन ऐप्स
  • दस्तावेज़ साझाकरण प्लेटफॉर्म
  • बादल भंडारण इंटरफेस
  • फ़ाइल हैंडलिंग वाले डेवलपर टूल्स
  • दृश्य फ़ाइल प्रकार संकेतों की आवश्यकता वाले UI

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

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

मूल README

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

📂 icon_file

A Flutter package to automatically display a file icon (SVG) with a dynamic badge based on the file extension (.pdf, .jpg, .zip, etc.).
Perfect for file explorers, downloads, or file previews in apps.

🧩 Features

  • Automatic detection of the file extension
  • Dynamic colored badge based on file type
  • Customizable style (color, text, etc.)
  • Supports over 30 common extensions
  • Ready for responsive layouts (ScreenUtil)
  • Dark mode friendly

📸 Preview

Default Icons Customized Icons
default_icons custom_icons

🚀 Installation

Add this to your pubspec.yaml:

dependencies:
  icon_file: ^1.0.X

Then run:

flutter pub get

🛠️ Basic Usage

import "package:icon_file/icon_file.dart";
FileIcon("document.pdf");

🎨 Example with Custom Styles

FileIcon(
  "custom.pdf",
  color: Colors.deepPurple,
  extensionStyle: TextStyle(
    fontSize: 12,
    fontWeight: FontWeight.bold,
    color: Colors.yellow,
  ),
)

💡 Available Parameters

Parameter Description
fileName (required) File name with extension (document.pdf)
color Custom background color for the badge (optional)
showExtension Whether to show the badge with the extension (default: true)
extensionStyle Text style for the extension badge
assetIcon Custom path to SVG icon (default: assets/file.svg)
size Size of the icon (default: 80)
roundedLabel Whether the badge has rounded corners (default: true)

🔍 Supported Extensions

This package automatically supports the following file types (and can be extended):

pdf, doc, docx, ppt, pptx, xls, xlsx, csv, txt, png, jpg, jpeg, svg, mp3, wav, aac, mp4, avi, mov, js, css, html, json, xml, zip, rar, 7z, tar, gz, dart


🧪 Full Example (UI)

List<String> files = [
  'document.pdf',
  'notes.docx',
  'image.png',
  'video.mp4',
  'music.mp3',
  'slides.pptx',
  'spreadsheet.xlsx',
  'archive.zip',
  'script.js',
  'style.css',
  'readme.txt',
  'logo.svg',
  'data.json',
  'source.dart',
];

List<Widget> icons = files.map((file) => FileIcon(file)).toList();

👥 Contributing

Contributions are welcome!
Feel free to open an issue, submit a pull request, or simply report a bug.


📄 License

This project is licensed under the MIT License.

श्रेणियाँ

निर्भरताएँ

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

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

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

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