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

flicked_cards कवर
पैकेज विवरणv0.0.3

flicked_cards

एक गतिशील नियंत्रण वाला कस्टमाइज़ेबल और एक्सटेंडेबल कार्ड विजेट

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
33
लाइक
82
Pub अंक
145

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

flutter pub add flicked_cards

पैकेज अवलोकन

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

Flicked Cards एक हस्ताक्षर-आधारित, कस्टमाइज़ेबल और विस्तारयोग्य कार्ड विजेट है जो Flutter में इंटरैक्टिव कार्ड फ्लिपिंग और स्वाइप एनीमेशन की अनुमति देता है। चिकनी ट्रांजिशन और प्रतिक्रियाशील हस्ताक्षर के साथ निर्मित, यह विकासकर्ताओं को ऐसे उपयोगकर्ता इंटरफेस बनाने की अनुमति देता है जहाँ कार्ड को आसान छूने के बाद फ्लिप किया जा सकता है या खारिज किया जा सकता है। यह पैकेज Android, iOS, Web, macOS, Windows और Linux जैसे कई प्लेटफॉर्म का समर्थन करता है, जिससे डायनामिक कार्ड-आधारित नेविगेशन या सामग्री प्रस्तुतीकरण की आवश्यकता वाले क्रॉस-प्लेटफॉर्म एप्लिकेशन के लिए आदर्श बनता है।

उपयोग

  • इंटरैक्टिव कार्ड स्लाइडर्स
  • स्वाइप-टू-डिसमिस इंटरफेस
  • हस्तगत सामग्री अन्वेषण
  • डैशबोर्ड में कार्ड फ्लिप एनीमेशन
  • स्वाइप करने योग्य कार्ड के साथ उपयोगकर्ता ओनबोर्डिंग प्रवाह

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

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

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

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

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

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

मूल README

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

flicked_cards

Build Status Codecov Pub Package MIT License

A gesture driven card swipping widget supporting custom animations.

Features

  • Awesome default animations provided out of the box
  • Progress through cards swipping both direction or in a single direction
  • Extensible through custom provided animations
  • Support piling or popping (depending on animation spec)

Examples

Here are some of the animation provided out of the box, take a look at the example to see all.

Cards used in these examples where taken from Brocodev

Example usage

FlickedCards(
  count: Superhero.marvelHeroes.length,
  animationStyle: FlipAnimation(),
  onSwiped: (idx, dir) => print('>>> $dir $idx'),
  builder: (index, progress, context) {
    final superHeroe = Superhero.marvelHeroes[index];
    return Container(
      child: Center(
        child: SuperheroCard(
            superhero: superHeroe,
            factorChange: 1 - progress),
      ),
    );
  },
)

Custom animations

flicked_cards provides an easy way to create custom animations but it is required to have a basic understanding of how cards can be layed out and how to position them depending on the drag progress and some of the properties in AnimationConfig.

Animations will be provided a progress value in the range (-1, 1) you should try to make you animation symmetric around 0 when posible. Like this:

You will have to reason about relative card indices:

Interface for animations

All animations will need to implement CardAnimation which basically defines:

  • animation of a particular card depending on swipe progress required
  • opacity of a particular card depending on swipe progress optional
  • where to apply transformations on cards (Fractional Offset)
typedef SwipeAnimation = Matrix4 Function(double progress);
typedef OpacityAnimation = double Function(double progress);

abstract class CardAnimation {
  AnimationConfig get config;
  LayoutConfig get layoutConfig;

  SwipeAnimation animationForCard({required int relativeIndex});

  OpacityAnimation opacityForCard({required int relativeIndex}) {
    return (_) => 1;
  }

  FractionalOffset fractionalOffsetForCard({required int relativeIndex});
}

Additionally to make this process a bit easier, 2 extra abstract classes that implement CardAnimation which are:

  • SymmetricCardAnimation
  • AsymmetricCardAnimation

Carousel animation is an example of a SymmetricCardAnimation take a look here

If struggling to make the animationlook at how the animations provided out of the box where implemented: here

Card layouts

Internally cards are placed in Stack widget so an animation can choose to work with a single or both of the following layouts:

Note that depending on the index some of cards will not be displayed:

श्रेणियाँ

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

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

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