सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
Octo Image एक विविध Flutter विजेट है जिसे चित्र लोडिंग के लिए डिज़ाइन किया गया है, जिसमें स्थानापन्न, त्रुटि प्रबंधन और स्मूथ फेडिंग ट्रांज़िशन जैसी उन्नत विशेषताएं शामिल हैं। यह चित्र परिवर्तनों का समर्थन करता है और बहुप्लेटफॉर्म पर चित्र प्रदर्शित करने के लिए एक साफ और कस्टमाइज़ करने योग्य इंटरफेस प्रदान करता है। प्रदर्शन और डेवलपर सुविधा के लिए बनाया गया, यह Flutter ऐप में सामान्य चित्र प्रदर्शन चुनौतियों को सरल बनाता है। पैकेज मौजूदा छवि लोडिंग कार्यप्रवाह के साथ बिना किसी दिक्कत के एकीकृत होता है और लोडिंग अवस्थाओं के दौरान उपयोगकर्ता अनुभव को दृश्य प्रतिक्रिया के साथ बढ़ाता है।
उपयोग
फॉलबैक के साथ नेटवर्क इमेज दिखाएं
लोडिंग स्थान भरने का कार्यान्वयन करें
चित्र लोड त्रुटियों को सहजता से संभालना
छवि फ़िल्टर या परिवर्तन लागू करना
चिकन फेड-इन प्रभाव बनाना
पूर्वलोडिंग के साथ UI प्रतिक्रियाशीलता में सुधार
मुख्य विशेषताएँ
स्थान आरक्षित और त्रुटि विजेट का समर्थन करता है
एम्बेडेड छवि परिवर्तन क्षमता
स्मूथ फेडिंग ट्रांज़िशन
प्लेटफॉर्म के अनुकूलता
कस्टमाइज़ किए गए लोडिंग और त्रुटि स्थितियाँ
कुशल कैशिंग और मेमोरी प्रबंधन
इनके लिए उपयुक्त
मजबूत छवि लोडिंग की आवश्यकता वाले ऐप्स
बेहतर छवि उपयोगकर्ता अनुभव की तलाश में विकासकर्ता
डायनामिक या दूरस्थ छवि स्रोत वाले प्रोजेक्ट्स
आवेदन जिनमें UI अधिक है और छवि के लगातार अपडेट होते हैं
प्लेटफॉर्म के आसपास सुसंगत छवि व्यवहार पर ध्यान केंद्रित करने वाली टीमें
विचार योग्य बातें
उन्नत परिवर्तन के लिए अतिरिक्त सेटअप की आवश्यकता होती है
थोड़ा बंडल आकार बढ़ सकता है
छवि-विशिष्ट उपयोगों तक सीमित
मूल छवि लोडिंग पुस्तकालय पर निर्भर करता है
सरल स्थिर छवि प्रदर्शन के लिए आदर्श नहीं
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
OctoImage
An image library for showing placeholders, error widgets and transform your image.
The CircleAvatar set shows a colored circle with the text inside during loading and when the image failed loading. When the image loads it animates to the image clipped as a circle.
ImageProviders
The recommended one is CachedNetworkImageProvider, as that supports the progress indicator, error and caching.
It also works on Android, iOS, web and macOS, although without caching on the web. Make sure you use at least version 2.2.0.
The second best is NetworkImage, but any ImageProvider works in theory. However, for some ImageProviders (such as MemoryImage)
it doesn't make sense to use OctoImage.
Placeholders and progress indicators
It would be best if you used either a placeholder or a progress indicator, but not both.
Placeholders are only building once the image starts loading, but progress indicators are rebuilt every time new progress information is received.
So if you don't use that progress indication, for example, with a static image, you should use a placeholder.
The most simple progress indicators use a CircularProgressIndicator.
Shows a circularProgressIndicator with indeterminate progress.
frame
Shows the Flutter Placeholder
OctoProgressIndicator
Explanation
circularProgressIndicator
Shows a simple CircularProgressIndicator
Error widgets
Error widgets are shown when the ImageProvider throws an error because the image failed loading. You can build a custom widget, or use the prebuild widgets:
Image builders can be used to adapt the image before it is shown. For example the circleAvatar clips the image in a circle, but you could also add an overlay or anything else.
The builder function supplies a context and a child. The child is the image widget that is rendered.
You get the most out of OctoImage when you use OctoSets. These sets contain a combination of a placeholder or progress indicator,
an image builder and/or an error widget builder. It always contains at least a placeholder or progress indicator and an error widget.
If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.
PR's with any new prebuild widgets or sets are highly appreciated.
Support
Feel free to open an issue. Make sure to use one of the templates!
Commercial support is available. Integration with your app or services, samples, feature request, etc. Email: [hello@baseflow.com](mailto:hello@baseflow.com)