multi_tap_action 0.0.2 multi_tap_action: ^0.0.2 copied to clipboard
A Flutter package that allows you to detect a specific number of taps on a widget and perform a custom action in response.
Multi Tap Action #
Features #
- Specify the desired number of taps: Define the exact number of taps required to trigger an action.
- Perform custom actions: Upon reaching the specified number of taps, execute any desired action.
- Simple integration: The package integrates seamlessly with your existing widgets using the familiar GestureDetector widget.
Getting started #
Install it using pub:
flutter pub add multi_tap_action
And import the package:
import 'package:multi_tap_action/multi_tap_action.dart';
Usage #
MultiTapAction(
taps: 3, // Number of taps to detect
action: () {
// Action to perform when the specified number of taps is reached
print('Triple tap detected!');
},
child: Container(
// Your child widget
color: Colors.blue,
width: 100,
height: 100,
),
)
Constructor #
Parameters | Type | Description |
---|---|---|
taps | int | Number of taps required to trigger the action. |
action | VoidCallback | Custom action to perform when the specified number of taps is detected. |
child | Widget | Widget on which taps are detected. |
Author #
This package was developed by sawongam