सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
path_icon एक Flutter पैकेज है जो कस्टम वेक्टर पाथ से बने आइकन विजेट प्रदान करता है। यह विकासकर्ताओं को सटीक पाथ परिभाषाओं का उपयोग करके स्केलेबल, रिज़ॉल्यूशन-स्वतंत्र आइकन बनाने की अनुमति देता है, जिससे पारंपरिक छवि-आधारित दृष्टिकोण की तुलना में आइकन डिज़ाइन में अधिक नियंत्रण मिलता है। अद्वितीय या शैलीगत आइकन की आवश्यकता वाले ऐप्स के लिए उपयुक्त, यह सभी प्रमुख प्लेटफॉर्म जैसे मोबाइल, वेब और डेस्कटॉप को समर्थन करता है। पैकेज Flutter के रेंडरिंग पाइपलाइन में बिना किसी दिक्कत के एकीकृत होता है और रंग, आकार और स्ट्रोक गुणों को आसानी से कस्टमाइज़ करने की अनुमति देता है।
उपयोग
कस्टम आइकन निर्माण
स्टाइलिश यूआई तत्व
प्लेटफॉर्म-सहित आइकन डिज़ाइन
न्यूनतम अनुप्रयोग इंटरफेस
वेक्टर-आधारित ब्रांडिंग संपत्ति
मुख्य विशेषताएँ
वेक्टर पथ-आधारित आइकन
प्लेटफॉर्म-स्वतंत्र रेंडरिंग
रंग और आकार कस्टमाइज़ेशन
उच्च स्केलेबिलिटी
Flutter के साथ सरल एकीकरण
इनके लिए उपयुक्त
सटीक आइकन नियंत्रण की तलाश में डिजाइनर
कस्टम UI कंपोनेंट बनाने वाले डेवलपर्स
अद्वितीय दृश्य पहचान वाले ऐप्स
प्रदर्शन और स्केलेबिलिटी पर ध्यान केंद्रित परियोजनाएँ
विचार योग्य बातें
पथ सिंटैक्स के बारे में ज्ञान की आवश्यकता है
स्थिर आइकन (कोई एनीमेशन नहीं) पर सीमित
जटिल रास्टर ग्राफिक्स के लिए आदर्श नहीं
सरल या ज्यामितीय आकृतियों के लिए सबसे उपयुक्त
शुरुआती लोगों के लिए बिल्ड कॉम्प्लेक्सिटी बढ़ सकती है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
If you don't give a viewBox, it is deduced from the path's bounds.
From SVG
To initialize the path with a data string as defined in SVG paths, use the fromData constructor.
Warning : the supported operations are very limited, on purpose. This makes the parsing pass more efficient ! So make sure to optimize your content before using it. Learn how to optimize your exports.
The built-in Icon widget uses font characters to renders icons. Since it may be more optimized, so more recommended in most cases, PathIcon may be better for development loop (i.e. exporting path data from a software like Figma) and it provides a simple animated variant.
What is the difference with flutter_svg images ?
SVG images are a lot more complete : they support colors, clipping and various other effects. So if you want to display complex icons, they may be a better option. But this comes at a cost : the parsing may be less efficient, and animated colors are not included. PathIcon on its side merges all paths from the document as a single Path to achieve this.
Why is the parsing of my SVG file isn't working well ?
The parsing pass is extremely simple, on purpose. You may have to cleanup a bit your SVG before importing it by having only simple filled (make sure to outline strokes and flatten your icon before exporting from your design software) elements : rect, ellipse, path, circle. The g groups have a basic support with only transforms. A more complete parsing solution may arrive in a near future, but it will have a dedicated parameter to make you realize the additional overrhead implied.