सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
SwipeRefresh एक Flutter पैकेज है जो स्क्रॉल करने योग्य सूचियों और अन्य सामग्री में नीचे की ओर खींचकर रिफ्रेश करने की क्षमता प्रदान करता है। यह उपयोगकर्ता अनुभव को बढ़ावा देता है, जिससे उपयोगकर्ता एक प्राकृतिक गति के साथ सामग्री को रिफ्रेश कर सकते हैं, जो डायनामिक डेटा वाले ऐप्स जैसे फीड या सूचियों में आम है। इस पैकेज का समर्थन Android, iOS, Web, macOS, Windows और Linux जैसे कई प्लेटफॉर्म के लिए है, जिससे उपकरणों के बीच संगत व्यवहार सुनिश्चित होता है। यह मौजूदा स्क्रॉल व्यू में बिना किसी दिक्कत के एकीकृत होता है और कस्टमाइज़ेबल इंडिकेटर और रिफ्रेश ट्रिगर प्रदान करता है।
उपयोग
सूची डेटा को ताजा करना
फीड कंटेंट अपडेट करना
पुल करने पर नए आइटम लोड हो रहे हैं
स्क्रॉल करने योग्य व्यू में यूएक्स सुधारना
डैशबोर्ड में पुल टू रिफ्रेश का कार्यान्वयन करना
मुख्य विशेषताएँ
नीचे खींचने के हस्तक्षेप समर्थन
कस्टमाइज़ किए गए रिफ्रेश इंडिकेटर
क्रॉस-प्लेटफ़ॉर्म सुविधा
ScrollViews के साथ आसान एकीकरण
निर्धारित ताज़ा करने का ट्रिगर समय
रिफ्रेश के दौरान चिकनी एनीमेशन
इनके लिए उपयुक्त
गतिशील सूचियाँ बना रहे विकासक
वास्तविक समय डेटा अपडेट की आवश्यकता वाले ऐप्स
उपयोगकर्ता अनुभव-केंद्रित मोबाइल और वेब एप्लिकेशन
प्लेटफॉर्म के बीच सुसंगत रिफ्रेश पैटर्न की आवश्यकता वाले प्रोजेक्ट
सरल उपयोगकर्ता इंटरैक्शन के लिए अग्रणी टीमें
विचार योग्य बातें
अतिरिक्त अवस्था प्रबंधन की आवश्यकता हो सकती है
भारी रिफ्रेश तर्क के साथ प्रदर्शन प्रभाव
जटिल रिफ्रेश एनीमेशन के लिए सीमित कस्टमाइज़ेशन
गैर-स्क्रॉल कंटेंट के लिए आदर्श नहीं
स्क्रॉल करने योग्य कंटेनर में सही उपयोग पर निर्भर करता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
Swipe Refresh
Overview
Widget for refresh by swipe.
:1234: Enabled on every platform - the package is fully written on Flutter side and enabled on every platform.
:recycle: Fully covered by tests - guaranteeing the result and expectations from this package.
:notebook_with_decorative_cover: End-to-end documentation - every aspect of implementation is documented, so there is full understanding.
:cow2: Support from the best Flutter experts - we are open to any enhancement ideas and contributions.
Refresh indicator widget with Material Design style.
SwipeRefresh.material(
stateStream: Stream<SwipeRefreshState>(),
onRefresh: _refresh,
padding: constEdgeInsets.symmetric(vertical: 10),
children: <Widget>[ ... ],
);
Future<void> _refresh() async {
// When all needed is done change state.
_controller.sink.add(SwipeRefreshState.hidden);
}
Cupertino
Refresh indicator widget with Cupertino Design style.
SwipeRefresh.cupertino(
stateStream: Stream<SwipeRefreshState>(),
onRefresh: _refresh,
padding: constEdgeInsets.symmetric(vertical: 10),
children: <Widget>[ ... ],
);
Future<void> _refresh() async {
// When all needed is done change state.
_controller.sink.add(SwipeRefreshState.hidden);
}
Adaptive
Refresh indicator widget with adaptive to platform style.
SwipeRefresh.adaptive(
stateStream: Stream<SwipeRefreshState>(),
onRefresh: _refresh,
padding: constEdgeInsets.symmetric(vertical: 10),
children: <Widget>[ ... ],
);
Future<void> _refresh() async {
// When all needed is done change state.
_controller.sink.add(SwipeRefreshState.hidden);
}
Builder
Refresh indicator widget with adaptive to platform style, and with SliverChildBuilderDelegate in childDelegate(so as not to create more child elements than are visible through Viewport).
At this moment, the current version of swipe_refresh is .
Changelog
All notable changes to this project will be documented in this file.
Issues
To report your issues, submit them directly in the Issues section.
Contribute
If you would like to contribute to the package (e.g. by improving the documentation, fixing a bug or adding a cool new feature), please read our contribution guide first and send us your pull request.
Your PRs are always welcome.
How to reach us
Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.