Skip to content

Instantly share code, notes, and snippets.

@crizant
Created February 19, 2020 06:30
Show Gist options
  • Save crizant/5027a23d50bd23feff0302bba9e85b0b to your computer and use it in GitHub Desktop.
Save crizant/5027a23d50bd23feff0302bba9e85b0b to your computer and use it in GitHub Desktop.
Flutter listen for pointer scroll events
Listener(
onPointerSignal: (PointerSignalEvent event) {
if (event is PointerScrollEvent) {
print('x: ${event.position.dx}, y: ${event.position.dy}');
print('scroll delta: ${event.scrollDelta}');
}
},
child: child,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment