Is there a better way to check Left/Right Drag in #flutter. I have done it but somtime it works sometime it doesn't.
new GestureDetector(
onHorizontalDragEnd: (DragEndDetails details) {
print("Drag Left - AddValue");
setState((){
_value++;
});
if (details.velocity.pixelsPerSecond.dx > -1000.0) {
print("Drag Right - SubValue");
setState((){
_value--;
});
}
},
child: new Container(
child:new Text("$_value"),
),
);
