multi_tap_action 0.0.2 copy "multi_tap_action: ^0.0.2" to clipboard
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.

example/multi_tap_action_example.dart

import 'package:flutter/material.dart';
import 'package:multi_tap_action/multi_tap_action.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          centerTitle: true,
          title: const Text('Multi Tap Action Example'),
        ),
        body: Center(
          child: MultiTapAction(
            taps: 3, // Number of taps to trigger the action
            action: () {
              // Custom action to perform when the specified number of taps is detected
              print('Triple tap detected!');
            },
            child: Container(
              width: 200,
              height: 200,
              color: Colors.blue,
              child: const Center(
                child: Text(
                  'Tap Me!',
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 20,
                  ),
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
1
likes
130
pub points
15%
popularity

Publisher

verified publishersangamadhikari.com

A Flutter package that allows you to detect a specific number of taps on a widget and perform a custom action in response.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on multi_tap_action