Skip to content

Instantly share code, notes, and snippets.

@Dvergar
Last active March 13, 2024 09:26
Show Gist options
  • Select an option

  • Save Dvergar/c3b5f5bfa1f4aaf1f9cc93338580e7ee to your computer and use it in GitHub Desktop.

Select an option

Save Dvergar/c3b5f5bfa1f4aaf1f9cc93338580e7ee to your computer and use it in GitHub Desktop.
Event kind
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
print('build');
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: Listener(
onPointerSignal: (event) {
print('event type ${event.kind}');
},
child: Container(
width: 400,
height: 400,
color: Colors.red,
),
)),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment