Skip to content

Instantly share code, notes, and snippets.

@HansMuller
Created July 12, 2022 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HansMuller/266b76c93a9f8821ced15205b187ea70 to your computer and use it in GitHub Desktop.
Save HansMuller/266b76c93a9f8821ced15205b187ea70 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Listener(
onPointerDown: (_) {
print('Pointer Down');
},
child: GestureDetector(
onDoubleTap: () {
print('Double Tap');
},
behavior: HitTestBehavior.opaque,
child: Container(
color: Colors.green.withOpacity(0.15),
width: 200,
height: 200,
),
),
),
),
);
}
}
void main() {
runApp(MaterialApp(home: Home()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment