पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

overscroll_pop कवर
पैकेज विवरणv0.1.1

overscroll_pop

एक फ्लटर विजेट जो स्क्रॉलव्यू के लिए है, ओवरस्क्रॉल करने पर पिन्टरेस्ट और इंस्टाग्राम ऐप की तरह बाहर आता है।

AndroidiOSWeb
30-दिन डाउनलोड
62
लाइक
123
Pub अंक
130

पैकेज इंस्टॉल करें

flutter pub add overscroll_pop

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

एक फ्लटर पैकेज जो स्क्रॉलव्यू में iOS-शैली के ओवरस्क्रॉल पॉप व्यवहार को सक्षम करता है, जिसमें पिन्टरेस्ट और इंस्टाग्राम जैसे ऐप्स में देखे जाने वाले इंटरैक्टिव स्क्रॉल-टू-रिफ्रेश या बैक गेस्चर की नकल की जाती है। यह उपयोगकर्ता अनुभव को बढ़ावा देता है, क्योंकि उपयोगकर्ता एक स्क्रॉल किए गए सूची के किनारे पर ओवरस्क्रॉल करके वापस जा सकते हैं। यह एंड्रॉइड, आईओएस और वेब के साथ संगत है, और मौजूदा स्क्रॉल किए गए विजेट्स में बिना जटिल सेटअप के बिना बिल्कुल भी एकीकृत हो सकता है। नेटिव आईओएस नेविगेशन पैटर्न की प्रतिलिपि बनाने वाले ऐप्स के लिए आदर्श है।

उपयोग

  • स्क्रॉल व्यू में iOS-शैली के बैक गेस्चर को लागू करना
  • सोशल मीडिया फीड में सहज नेविगेशन बनाना
  • सूची-आधारित इंटरफेस में उपयोगकर्ता अंतरक्रिया को बढ़ावा देना
  • मोबाइल एप्लिकेशन में प्राकृतिक ओवरस्क्रॉल प्रभाव जोड़ना
  • स्वाइप करके वापस जाने का समर्थन करना

मुख्य विशेषताएँ

  • iOS-जैसा ओवरस्क्रोल पॉप व्यवहार
  • ScrollView विजेट्स के साथ निरंतर एकीकरण
  • प्लेटफॉर्म के लिए समर्थन (Android, iOS, Web)
  • आवश्यक न्यूनतम कॉन्फ़िगरेशन
  • चिकन और प्रतिक्रियाशील गेस्चर डिटेक्शन

इनके लिए उपयुक्त

  • सोशल मीडिया ऐप बनाने वाले डेवलपर्स
  • टीम्स आईओएस मूल व्यवहार की प्रतिलिपि बना रहे हैं
  • स्क्रॉल-आधारित नेविगेशन की आवश्यकता वाले ऐप्स
  • मोबाइल प्लेटफॉर्म के लिए फ्लटर प्रोजेक्ट्स
  • गतिशील प्रतिक्रिया के लिए ध्यान केंद्रित उपयोगकर्ता अनुभव आधारित एप्लिकेशन

विचार योग्य बातें

  • अन्य गेस्चर डिटेक्टर्स के साथ टकराव हो सकता है
  • गैर-iOS प्लेटफॉर्म पर व्यवहार असंगत महसूस हो सकता है
  • विभिन्न उपकरणों पर सावधानीपूर्वक परीक्षण की आवश्यकता है
  • सभी यूआई डिजाइन के लिए उपयुक्त नहीं है
  • गति के अवधारणा के लिए सीमित कस्टमाइजेशन विकल्प

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

overscroll_pop

A Flutter widget for Scrollview, pop when overscroll like Instagram, Pinterest, ...

Demo Demo Demo

Getting Started

  1. Include the package to your project as dependency:
dependencies:
  	overscroll_pop: <latest version>
  1. Use the widget:

Wrap your Scaffold or top widget by OverscrollPop, every ScrollView widget (Listview, GridView, PageView, CustomScrollView, ...) which has scroll physics ClampingScrollPhysics(important) will have overscroll to pop effect.

    MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Overscroll Example'),
        ),
        body: Builder(
          builder: (c) => Center(
            child: Hero(
              tag: '${ScrollToPopOption.start}${DragToPopDirection.toRight}',
              child: ElevatedButton(
                onPressed: () => pushPage(
                  c,
                  (BuildContext context, _, __) => VerticalScrollview(
                    scrollToPopOption: ScrollToPopOption.start,
                    dragToPopDirection: DragToPopDirection.toRight,
                  ),
                ),
                child: Text('Vertical scrollview ${ScrollToPopOption.start}'),
              ),
            ),
          ),
        ),
      ),
    );

    class VerticalScrollview extends StatelessWidget {
      final ScrollToPopOption scrollToPopOption;
      final DragToPopDirection? dragToPopDirection;

      const VerticalScrollview({
        Key? key,
        this.scrollToPopOption = ScrollToPopOption.start,
        this.dragToPopDirection,
      }) : super(key: key);

      @override
      Widget build(BuildContext context) {
        return OverscrollPop(
          scrollToPopOption: scrollToPopOption,
          dragToPopDirection: dragToPopDirection,
          child: Container(
            clipBehavior: Clip.hardEdge,
            decoration: BoxDecoration(borderRadius: BorderRadius.circular(16.0)),
            child: Scaffold(
              appBar: PreferredSize(
                preferredSize: Size.fromHeight(kToolbarHeight),
                child: Hero(
                  tag: '$scrollToPopOption${dragToPopDirection ?? ''}',
                  child: AppBar(
                    title: Text(
                      'Vertical Scrollview',
                      overflow: TextOverflow.visible,
                    ),
                  ),
                ),
              ),
              body: ListView.builder(
                physics: const ClampingScrollPhysics(),
                itemBuilder: (_, index) => Container(
                  height: 160.0,
                  margin: const EdgeInsets.symmetric(vertical: 8.0),
                  color: index % 2 == 0 ? Colors.cyanAccent : Colors.orangeAccent,
                  alignment: Alignment.center,
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Text(scrollToPopOption.toString()),
                      if (dragToPopDirection != null)
                        Text(dragToPopDirection.toString()),
                    ],
                  ),
                ),
                itemCount: MediaQuery.of(context).size.height ~/ 160.0 + 2,
              ),
            ),
          ),
        );
      }
    }

If your Scaffold does not contain any ScrollView and want to achieve drag to pop effect, wrap your Scaffold or top widget by DragToPop instead (Example).

Quick push route config helper:

pushOverscrollRoute(
    context: context,
    child: <your scaffold/widget>,
    // scrollToPopOption: <your ScrollToPopOption>,
    // dragToPopDirection: <your DragToPopDirection>,
    // other route configs
)

pushDragToPopRoute(
    context: context,
    child: <your scaffold/widget>,
    // other route configs
)
  1. Configure scroll direction and add extra drag to pop:
    • By default, the effect only apply for overscroll at the start of ScrollView (top edge of vertical scroll, left edge of horizontal scroll)

      VStart HStart

    • To enable the end edge (or both edges) for overscroll to pop, set scrollToPopOption to ScrollToPopOption.end (or ScrollToPopOption.both)

      OverscrollPop(
        scrollToPopOption: ScrollToPopOption.end, // or ScrollToPopOption.both
        ...
      )
      

      VEnd HEnd

    • Beside overscroll, you can config the other drag direction to achieve the pop effect by passing dragToPopDirection

      OverscrollPop(
        dragToPopDirection: DragToPopDirection.toTop, //  toTop, toBottom, toLeft, toRight, horizontal and vertical
        ...
      )
      
      1. Vertical scroll: drag to left, right or horizontal (both left and right) VStartToLeft VStartToLeft

      2. Horizontal scroll: drag to top, bottom or vertical (both top and bottom) HEndToTop HEndToBottom

श्रेणियाँ

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।