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

touchable_opacity कवर
पैकेज विवरणv1.2.0

touchable_opacity

यह विजेट आपके ऐप के साथ उपयोगकर्ता के बातचीत के दौरान अधिक दृश्य प्रतिक्रिया प्रदान करने में सक्षम बनाता है, जैसे कि React Native में TouchableOpacity होता है।

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

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

flutter pub add touchable_opacity

पैकेज अवलोकन

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

touchable_opacity पैकेज एक Flutter विजेट प्रदान करता है जो उपयोगकर्ता द्वारा UI तत्वों के साथ बातचीत करने पर दृश्य प्रतिक्रिया प्रदान करता है, जो React Native में TouchableOpacity के व्यवहार की नकल करता है। दबाने पर अपनी अपारदर्शिता को हल्के से बदलकर यह उपयोगकर्ता अनुभव को बढ़ाता है, जिससे अंतरक्रिया अधिक प्रतिक्रियाशील महसूस होती है। यह सभी प्रमुख प्लेटफॉर्मों जैसे Android, iOS, Web, macOS, Windows और Linux के साथ संगत है, और मौजूदा Flutter प्रोजेक्ट में आसानी से एकीकृत होता है। पैकेज हल्का है और सरलता के लिए डिज़ाइन किया गया है, जिसमें अतिरिक्त जटिलता के बिना स्पष्ट छूने की प्रतिक्रिया पर ध्यान केंद्रित किया गया है।

उपयोग

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

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

  • अपारदर्शिता-आधारित दबाव प्रतिक्रिया
  • क्रॉस-प्लेटफॉर्म संगतता
  • आवश्यक सेटअप न्यूनतम
  • React Native के TouchableOpacity के व्यवहार के समान
  • हल्का और कार्यक्षम

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

  • React Native के साथ परिचित Flutter विकासकर्ता
  • स्थिर टच प्रतिक्रिया की आवश्यकता वाले ऐप
  • UI-भारी एप्लिकेशन
  • सरल गेस्चर विस्तार के लिए खोज रहे डेवलपर्स
  • कई प्लेटफॉर्म के लिए लक्षित प्रोजेक्ट

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

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

मूल README

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

touchable_opacity

Version Build Status codecov

This package gives you access to the Touchableopacity widget. This widget uses the GestureDetector to allow interaction and animated to opacity of the widget on touch events.

Installing

Add the package to your pubspec.yaml file

dependencies:
	touchable_opacity: 1.2.0
Usage

Import the package using

import 'package:touchable_opacity/touchable_opacity.dart';

And simply use it as any other widget.

Container(
	child: TouchableOpacity(
		activeOpacity: 0.4,
		child: FlutterLogo(),
	),
),
Configuration

TouchableOpacity uses gestureDetector internally and tries to maintain all the different behaviours and interactions that gesture detector enables. To understand the different touch events that you can configure please visit the GestureDetector API docs here.

activeOpacity: double value that TouchableOpacity uses to animate the opacity of the child when a touch down event is received. The value must be between 1.0 and 0.0, the default value is 0.2 .

Example

The code found in the example folder of this repo shows how to use this package to render the content shown in the sample GIF. The folder contains a Flutter application that you can run yourself. Go here to jump into the code.

Support

If you have any issues with using this package, or have any ideas you thnk are good additions please create an issue here

Known Issues

Because of the way GestureDetector renders, TouchableOpacity fills its parent. If you want to bound the size to that of its child simply place the TouchableOpacity widget in any one of the Layout widgets, you can see a list of layout widgets available in flutter here

श्रेणियाँ

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

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