Created
January 19, 2018 21:32
-
-
Save amirh/aa74d0a3bc25d7144417418f76cba45c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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