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

swipable_stack कवर
पैकेज विवरणv2.0.0

swipable_stack

एक कार्ड स्टैकिंग के लिए विजेट, जिसमें उपयोगकर्ता टिंडर की तरह क्षैतिज और लंबवत रूप से स्वाइप कर सकते हैं और शानदार एनीमेशन के साथ।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
8.3 हज़ार
लाइक
325
Pub अंक
150

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

flutter pub add swipable_stack

पैकेज अवलोकन

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

एक फ्लटर विजेट जो टिंडर से प्रेरित चलने वाले कार्ड स्टैक को बनाता है, जिसमें चलने की आसान और चलने की गति होती है। यह उपयोगकर्ताओं को अच्छी तरह से बाएं या दाएं (या ऊपर/नीचे) स्वाइप करने की अनुमति देता है और शानदार ट्रांज़िशन के साथ आता है। डेटिंग ऐप्स, उत्पाद प्रदर्शन या सामग्री खोज विशेषताओं जैसे स्वाइप-आधारित इंटरफेस की आवश्यकता वाले ऐप्स के लिए आदर्श है। यह पैकेज एंड्रॉइड, आईओएस, वेब, मैकओएस, विंडोज और लिनक्स सहित कई प्लेटफॉर्म को समर्थन देता है, जिससे उपकरणों के बीच सुस्पष्ट व्यवहार सुनिश्चित होता है।

उपयोग

  • डेटिंग ऐप इंटरफेस
  • उत्पाद या आइटम खोज
  • स्वाइप गेस्चर के साथ सामग्री ब्राउज़ करें
  • इंटरैक्टिव ऑनबोर्डिंग फ्लो
  • गेमिफाइड उपयोगकर्ता भागीदारी
  • स्वाइप-आधारित प्रश्नोत्तरी

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

  • चिकन लंबवत और क्षैतिज स्वाइप
  • कस्टमाइज़ किए गए एनीमेशन कर्व
  • फीडबैक के साथ गतिशील पहचान
  • बहुप्लेटफॉर्म समर्थन
  • मौजूदा UI के साथ आसान एकीकरण
  • कॉन्फ़िगरेबल कार्ड एलाइनमेंट और स्पेसिंग

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

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

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

  • बड़े कार्ड स्टैक के लिए प्रदर्शन समायोजन की आवश्यकता हो सकती है
  • जटिल एनीमेशन के लिए सीमित आंतरिक कस्टमाइजेशन
  • तेज़ स्वाइप के दौरान राज्य का सावधानीपूर्वक निपटान आवश्यक है
  • अत्यधिक उच्च आवृत्ति के स्वाइप इंटरैक्शन के लिए अनअनुकूलित
  • मध्यम कार्ड गिनती के लिए सबसे उपयुक्त ताकि प्रतिक्रिया बनी रहे

मूल README

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

swipable_stack

pub.dev github likes popularity pub points license

A widget for stacking cards, which users can swipe horizontally and vertically with beautiful animations like Tinder UI.

demo

(Sorry, the package name swipable_stack is typo of swipeable stack)

Usage

builder

A SwipableStack uses a builder to display widgets.

SwipableStack(
  builder: (context, properties) {
    return Image.asset(imagePath);
  },
),

onSwipeCompleted

You can get completion event with onSwipeCompleted.

SwipableStack(
  onSwipeCompleted: (index, direction) {
    print('$index, $direction');
  },
)

overlayBuilder

You can show overlay on the front card with overlayBuilder.

SwipableStack(
  overlayBuilder: (context, properties) {
    final opacity = min(properties.swipeProgress, 1.0);
    final isRight = properties.direction == SwipeDirection.right;
    return Opacity(
      opacity: isRight ? opacity : 0,
      child: CardLabel.right(),
    );
  },
)

controller

SwipableStackController allows you to control swipe action & also rewind recent action.

final controller = SwipableStackController();

SwipableStack(
  controller:controller,
  builder: (context, properties) {
    return Image.asset(imagePath);
  },
);
controller.next(
  swipeDirection: SwipeDirection.right,
);
controller.rewind();

SwipableStackController provides to access currentIndex of SwipableStack.

final controller = SwipableStackController();
controller.addListener(() {
  print('${_controller.currentIndex}');
});

onWillMoveNext

You can also restrict user actions according to index or action with onWillMoveNext.

SwipableStack(
  onWillMoveNext: (index, direction) {
    final allowedActions = [
      SwipeDirection.right,
      SwipeDirection.left,
    ];
    return allowedActions.contains(direction);
  },
);

swipeAssistDuration

You can set the speed the user is able to swipe through Widgets with the swipeAssistDuration.

SwipableStack(
  swipeAssistDuration: Duration(milliseconds: 100),
)

The default is 650ms.

stackClipBehaviour

You can set the clipBehaviour of the stack with the stackClipBehaviour.
Change it to Clip.none to exceed the boundaries of parent widget size.

SwipableStack(
  stackClipBehaviour: Clip.none,
)

The default is Clip.hardEdge.

allowVerticalSwipe

Disable vertical swipe with allowVerticalSwipe.
Changing to false disable vertical swipe capabilities

SwipableStack(
  allowVerticalSwipe: false,
)

The default is true.

swipeTopAnchor

Set the swipe anchor with swipeAnchor with the following enum SwipeAnchor.top : card rotation on bottom and anchored on top SwipeAnchor.bottom : card rotation on top and anchored on bottom

SwipableStack(
  swipeAnchor: SwipeAnchor.top,
)

The default is SwipeAnchor.top.

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 1 आइटम

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

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

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