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

wheel_slider कवर
पैकेज विवरणv1.2.2

wheel_slider

Wheel Slider को बहुत कस्टमाइजेशन मिलता है और आपको एक चक्की के जैसा दिखने वाले तरीके से घूमने की अनुमति देता है।

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

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

flutter pub add wheel_slider

पैकेज अवलोकन

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

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

उपयोग

  • संख्यात्मक चयन के साथ फॉर्म इनपुट
  • कस्टम संख्या पिकर
  • इंटरैक्टिव ऐप सेटिंग्स
  • गेमिफाइड यूजर इंटरफेस तत्व
  • समय या तारीख चयनकर्ता
  • दृश्य डेटा इनपुट

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

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

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

  • अद्वितीय इनपुट विजेट्स की खोज कर रहे डेवलपर्स
  • दृश्य डेटा एंट्री की आवश्यकता वाले ऐप्स
  • डिज़ाइन-केंद्रित Flutter परियोजनाएं
  • इंटरैक्टिव शैक्षिक उपकरण
  • मूल्य चयन वाले खेल

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

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

मूल README

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

Wheel Slider

A versatile and highly customizable slider widget for Flutter, with a wheel-like scrolling appearance.

pub package License: MIT

gif of wheel slider gif of wheel slider

Built on top of wheel_chooser for an enhanced experience.

✨ Features

  • 🔢 Number Display: Show numbers instead of simple lines.
  • ↔↕ Scroll Orientation: Horizontal and vertical scrolling options.
  • 📳 Haptic Feedback: Vibrates during scroll for a tactile experience.
  • 🔧 Custom Widgets: Fully customizable items and pointers.
  • 🖼️ Background Support: Add a widget as the slider's background.
  • 🎨 Styling Options: Easily customize line and pointer colors.

🚀 Getting Started

Installation

Add the following to your pubspec.yaml under dependencies:

  dependencies:
    wheel_slider:
Import
import 'package:wheel_slider/wheel_slider.dart';
Android Permissions

Add the vibration permission to your AndroidManifest.xml file:

<uses-permission android:name="android.permission.VIBRATE"/>
IOS Compatibility

Supports vibration with duration and pattern on CoreHaptics devices. On older devices, the pattern is emulated with 500ms long vibrations.

📖 Usage

To use Line Slider:

WheelSlider(
    totalCount: _totalCount,
    initValue: _initValue,
    onValueChanged: (val) {
        setState(() {
          _currentValue = val;
        });
    },
    hapticFeedbackType: HapticFeedbackType.vibrate,
),

To use Line Slider with displaying double value:

WheelSlider(
    interval: 0.5,  // this field is used to show decimal/double values
    totalCount: _totalCount,
    initValue: _initValue,
    onValueChanged: (val) {
        setState(() {
          _currentValue = val;
        });
    },
    hapticFeedbackType: HapticFeedbackType.vibrate,
),

To use Number Slider:

WheelSlider.number(
    perspective: 0.01,
    totalCount: _nTotalCount,
    initValue: _nInitValue,
    unSelectedNumberStyle: const TextStyle(
        fontSize: 12.0,
        color: Colors.black54,
    ),
    currentIndex: _nCurrentValue,
    onValueChanged: (val) {
        setState(() {
          _nCurrentValue = val;
        });
    },
    hapticFeedbackType: HapticFeedbackType.heavyImpact,
),

To use Number Slider with displaying double value:

WheelSlider.number(
    interval: 0.5, // this field is used to show decimal/double values
    perspective: 0.01,
    totalCount: _nTotalCount,
    initValue: _nInitValue,
    unSelectedNumberStyle: const TextStyle(
        fontSize: 12.0,
        color: Colors.black54,
    ),
    currentIndex: _nCurrentValue,
    onValueChanged: (val) {
        setState(() {
          _nCurrentValue = val;
        });
    },
    hapticFeedbackType: HapticFeedbackType.heavyImpact,
),

To use Custom Widget Slider:

WheelSlider.customWidget(
    totalCount: 12,
    initValue: 5,
    isInfinite: false,
    scrollPhysics: const BouncingScrollPhysics(),
    children: List.generate(12, (index) => const Center(
        child: FlutterLogo(
            size: 100,
        ),
    )),
    onValueChanged: (val) {
        setState(() {
          _cCurrentValue = val;
        });
    },
    hapticFeedbackType: HapticFeedbackType.vibrate,
    showPointer: false,
    itemSize: 80,
),
🛠️ Properties
  • controller - A FixedExtentScrollController that allows you to manage and control the scroll position of the slider.
  • interval - To display decimal values. By default it is set to 1, when changed totalCount also to be updated accordingly.
  • currentIndex - Gets the current value as you scroll the Number Slider.
  • perspective - Change the way you want the slider to look from a flat to a wheel like shape and the value must be <= 0.01.
  • squeeze - Adjust the spacing between each item in the slider.
  • isVibrate - To turn on/off vibration while scrolling.
  • hapticFeedbackType - Allows you to change the vibration type.
  • itemSize - Size of each item in the slider.
  • background - Use any widget to add as a background to the slider.
  • allowPointerTappable:
    • When this is set to false scroll functionality won't work for the occupied region.
    • When using customPointer with GestureDetector/InkWell, set it to false to enable gestures.
    • When using default pointer set it to default state i.e true.

श्रेणियाँ

निर्भरताएँ

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

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

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

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