Skip to content

Instantly share code, notes, and snippets.

@amirh
Created January 19, 2018 21:32
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 amirh/aa74d0a3bc25d7144417418f76cba45c to your computer and use it in GitHub Desktop.
Save amirh/aa74d0a3bc25d7144417418f76cba45c to your computer and use it in GitHub Desktop.
return new GestureDetector(
behavior: HitTestBehavior.opaque,
onHorizontalDragEnd: (DragEndDetails d) {
if (d.primaryVelocity > 0) {
GameRedux.dispatch(context, moveRight());
} else {
GameRedux.dispatch(context, moveLeft());
}
},
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment