上下左右滑动
child: GestureDetector(
onHorizontalDragEnd: (endDetails){
double velocity = endDetails.primaryVelocity;
if (velocity < 0) {
print('left');
} else {
print('right');
}
},
onVerticalDragEnd: (endDetails) {
double velocity = endDetails.primaryVelocity;
if (velocity < 0) {
print('up');
} else {
print('down');
}
},
child: Stack(
children: brickMatrix,
),
浙公网安备 33010602011771号