सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
Backdrop एक Flutter पैकेज है जो Material Design Backdrop कंपोनेंट को लागू करता है, जिससे मुख्य सामग्री क्षेत्र और द्वितीयक पैनल (जैसे ड्रॉअर या शीट) के बीच चिकनी संक्रमण की अनुमति मिलती है। इसमें पैरलैक्स प्रभाव वाले इंटरैक्टिव बैकड्रॉप और कस्टमाइज़ करने योग्य एनीमेशन समर्थित हैं। इसे Android, iOS, Web, macOS, Windows और Linux पर उपयोग के लिए डिज़ाइन किया गया है, जो उपयोगकर्ता अनुभव को सहज नेविगेशन और परतदार इंटरफ़ेस के माध्यम से बढ़ाता है। पैकेज को मानक विजेट पैटर्न का उपयोग करके Flutter ऐप्स में आसानी से एकीकृत किया जा सकता है।
उपयोग
स्लाइडिंग साइड पैनल बनाना
पैरलैक्स के साथ इंटरैक्टिव बैकड्रॉप्स का अनुप्रयोग
प्रतिक्रियाशील नेविगेशन ड्रॉर्स बिल्ड करें
परतदार लेआउट के साथ UI गहराई में सुधार करना
मोबाइल-पहले इंटरफेस कंपोनेंट्स डिज़ाइन करना
मुख्य विशेषताएँ
पैरलैक्स स्क्रॉलिंग प्रभाव
स्मूथ ट्रांजिशन एनीमेशन
कस्टमाइज़ किए गए बैकड्रॉप व्यवहार
कई प्लेटफॉर्म का समर्थन करता है
बिल्ट-इन गेस्चर हैंडलिंग
विस्तार्य विजेट संरचना
इनके लिए उपयुक्त
मोबाइल ऐप विकासकर्ता
Material Design का उपयोग करने वाले UI/UX डिज़ाइनर
परतदार नेविगेशन की आवश्यकता वाले ऐप्स
जटिल बॉटम शीट्स बनाने वाले डेवलपर्स
परिष्कृत उपयोगकर्ता इंटरैक्शन पर केंद्रित टीमें
विचार योग्य बातें
Flutter के एनिमेशन सिस्टम की समझ आवश्यक है
कम शक्ति वाले डिवाइस पर प्रदर्शन प्रभावित हो सकता है
गड़बड़ी से बचने के लिए सावधानीपूर्वक डिज़ाइन की आवश्यकता होती है
मूल विन्यासों के आगे सीमित कस्टमाइजेशन
विशिष्ट लेआउट पैटर्न के लिए बेहतर है, सामान्य उपयोग के लिए नहीं
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
backdrop
ARCHIVE NOTE: Backdrop was based on the Material 2 Backdrop specification, which is no longer actively maintained. Material 3 does not include a Backdrop specification. As a result, this package is no longer actively developed and is limited to maintenance and critical fixes.
To use backdrop for navigation, use the provided BackdropNavigationBackLayer as backLayer.
The BackdropNavigationBackLayer contains a property items representing the list elements shown on the back layer. The front layer has to be "manually" set depending on the current index, which can be accessed with the onTap callback.
To access backdrop related functionalities, use Backdrop.of(context) to get underlying BackdropScaffoldState.
BackdropScaffoldState exposes various properties and methods like:
properties
animationController -> AnimationController
scaffoldKey -> GlobalKey<ScaffoldState>
isBackLayerConcealed -> bool
isBackLayerRevealed -> bool
methods
fling()
concealBackLayer()
revealBackLayer()
Note:Backdrop is an InheritedWidget and therefore like Scaffold.of, Theme.of and MediaQuery.of, the BuildContext context passed to Backdrop.of(context) should be of a Widget that is under the BackdropScaffold in the "widget tree". In other words, Backdrop.of called inside a widget where the BackdropScaffold is initalized will not work explicitly, since the context passed is of the widget that will build BackdropScaffold therefore above BackdropScaffold. This can be solved by either making a seperate Widget where Backdrop.of needs to be used and make it the "child" of BackdropScaffold or wrap the Backdrop.of usage around Builder widget so that the "correct" context (from Builder) is passed to Backdrop.of. This answere on SO and FWotW video on Builder gives a very good idea of how and why Builder works in later case.