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

पैकेज विवरणv0.5.3

follow_the_leader

अन्य विजेट्स का पीछा करने वाले विजेट्स।

AndroidiOS
30-दिन डाउनलोड
40.1 हज़ार
लाइक
37
Pub अंक
150

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

flutter pub add follow_the_leader

पैकेज अवलोकन

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

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

उपयोग

  • गतिशील सुझाव बनाना
  • सामग्री का पता लगाने वाले फ्लोटिंग एक्शन बटन बनाना
  • एनिमेटेड ओवरले डिज़ाइन करना
  • गाइडेड टूर का कार्यान्वयन
  • कर्सर या चयन मार्गों का दृश्यीकरण

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

  • रियल-टाइम विजेट ट्रैकिंग
  • स्मूथ एनिमेशन एकीकरण
  • क्रॉस-प्लेटफॉर्म संगतता
  • न्यूनतम बॉयलरप्लेट
  • न्यूनतम ओवरहेड के साथ कुशल रенडरिंग

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

  • इंटरैक्टिव तत्वों की तलाश में UI/UX डिज़ाइनर
  • गाइडेड ओनबोर्डिंग फ्लो बना रहे विकासकर्मी
  • गतिशील दृश्य प्रतिक्रिया की आवश्यकता वाले ऐप
  • चिकन एमोबाइल अनुभव पर ध्यान केंद्रित टीमें

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

  • बहुत सारे ट्रैक किए गए विजेट्स के साथ प्रदर्शन प्रभावित हो सकता है
  • ओवरलैप से बचने के लिए सावधानी से स्थापित करें
  • स्थिर लेआउट के लिए उपयुक्त नहीं
  • निम्न-स्तर के उपकरणों पर परीक्षण की आवश्यकता है
  • हल्के लक्ष्य विजेट के साथ सबसे अच्छा उपयोग किया जाता है

मूल README

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

Follow the Leader - Widgets following widgets

Built by the Flutter Bounty Hunters


Getting Started

Select a widget that you want to follow and wrap it with a Leader widget. Give the Leader widget a LeaderLink, to share with Followers.

Leader(
  link: _leaderLink,
  child: YourLeaderWidget(),
);

Add a widget that you want to follow your Leader, and wrap it with a Follower widget.

// Follower appears 20px above the Leader.
Follower.withOffset(
  link: _leaderLink,
  offset: const Offset(0, -20),
  leaderAnchor: Alignment.topCenter,
  followerAnchor: Alignment.bottomCenter,
  child: YourFollowerWidget(),
);

Follower's can position themselves with a constant distance from a Leader using .withOffset(), as shown above. Or, Follower's can choose their exact location on every frame by using .withAligner().

// Follower appears where the aligner says it should.
Follower.withAligner(
  link: _leaderLink,
  aligner: _aligner,
  child: YourFollowerWidget(),
);

To constrain where your Follower is allowed to appear, pass a boundary to your Follower.

// Follower is constrained by the given boundary.
Follower.withAligner(
  link: _leaderLink,
  aligner: _aligner,
  boundary: _boundary,
  child: YourFollowerWidget(),
);

Building multiple widgets without layouts

Building follower widgets is a bit unusual with Flutter. Typically, whenever we build multiple widgets in Flutter, we place them in a layout container, such as Column, Row, or Stack. But follower widgets don't respect ancestor layout rules. That's the whole point.

follow_the_leader introduces a new container widget, which builds children, but doesn't attempt to apply any particular layout rules. The primary purpose of this widget is to make it clear to readers that you aren't trying to layout the children.

BuildInOrder(
  children: [
    MyContentWithALeader(),
    Follower.withOffset(),
    Follower.withDynamics(),
  ],
);

The BuildInOrder widget builds each child widget in the order that it's provided. This fact is important because Leader widgets must be built before their Followers. But BuildInOrder does not impose any Offset on its children. BuildInOrder passes its parent's constraints down to the children.

श्रेणियाँ

निर्भरताएँ

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

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

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