सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
ScreenLoader एक Flutter/Dart पैकेज है जो स्क्रीन पर लोडिंग स्थिति को प्रबंधित करने के लिए एक सरल मिक्सिन प्रदान करता है, बिना स्पष्ट रूप से राज्य प्रबंधन या नेविगेशन स्टैक संशोधन के। यह डेवलपर्स को न्यूनतम बॉयलरप्लेट के साथ स्क्रीनों के बीच लोडिंग इंडिकेटर को प्रदर्शित और नियंत्रित करने की अनुमति देता है। पैकेज लोडिंग UI के कस्टमाइज़ेशन का समर्थन करता है, जिससे यह विभिन्न डिज़ाइन आवश्यकताओं के लिए अनुकूलित किया जा सकता है। बहुत उपयुक्त ऐसे ऐप्स के लिए जिन्हें कई विजेट्स में एक समान, पुन: उपयोगी लोडिंग अनुभव की आवश्यकता होती है।
उपयोग
असिंक ऑपरेशन के दौरान लोडिंग ओवरले दिखाएं
फॉर्म में लोडिंग स्थिति प्रबंधन को सरल बनाना
API कॉल में लोडिंग इंडिकेटर जोड़ना
पुन: उपयोगी लोडिंग कंपोनेंट्स बनाना
चिकनी लोडिंग ट्रांज़िशन के साथ UX में सुधार
स्क्रीन-स्तर लोडिंग लॉजिक में बॉयलरप्लेट कम करना
मुख्य विशेषताएँ
मिक्सिन-आधारित लोडिंग कार्यान्वयन
निर्देशित लोडिंग UI
अवस्था प्रबंधन की आवश्यकता नहीं है
सभी प्लेटफॉर्मों पर काम करता है
आवश्यक सेटअप न्यूनतम
असिंक्रोनस संचालन निर्माण का समर्थन करता है
इनके लिए उपयुक्त
हल्के लोडिंग समाधान की तलाश में विकासकर्मी
न्यूनतम अवस्था प्रबंधन का उपयोग करने वाली टीमें
अक्सर एसिंक डेटा फीचर वाले ऐप्स
स्थिर लोडर की आवश्यकता वाले UI-भारी एप्लिकेशन
Flutter शुरुआती लोडिंग पैटर्न का अन्वेषण कर रहे हैं
कई उपकरणों के लिए लक्षित क्रॉस-प्लेटफ़ॉर्म एप्लिकेशन
विचार योग्य बातें
मूलभूत लोडिंग कार्यक्षमता तक सीमित
असिंक्रोनस वर्कफ़्लो के साथ हस्तचालित एकीकरण की आवश्यकता है
जटिल लोडिंग स्थितियों के लिए उपयुक्त नहीं
कस्टम डिजाइन के लिए अतिरिक्त स्टाइलिंग की आवश्यकता हो सकती है
सही विजेट वृक्ष संरचना पर निर्भर करता है
डिफ़ॉल्ट रूप से त्रुटि अवस्थाओं का निपटान नहीं करता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
screen_loader
Why ScreenLoader?
With the help of stream_mixin, it shows and hides the loader without updating the state of the widget which increases the performance
It does not push any sort of widget to navigation stack, this helps in not messing up the navigation stack and context
Easy to use, just use your screen with ScreenLoader mixin and wrap the widget with loadableWidget
The loader is customizable. You can use any widget as a loader
You can configure same loader for all the screens at once
You can also configure different loader for different screens
Basic usage
Use your screen with the ScreenLoader mixin
Wrap the widget with loadableWidget
Use performFuture function to show loader while your future is being performed
Configure different loader for individual screen
Simply overide loader() method
loader() {
// here any widget would doreturnAlertDialog(
title: Text('Wait.. Loading data..'),
);
}
Global loader: the one you specify in configScreenLoader. Note: if you don't override local(), this loader will be used
Default loader: if you don't specify global loader or override local loader, this loader will be used
Migration guide to 4.0.0
ScreenLoaderApp widget is removed. Now no need to wrap your App around any widget just to set the global configurations. Instead call configScreenLoader() before runApp()
Instead of replacing the build function with screen use the build function itself and wrap the widget you want to show loader on with the loadableWidget.