上下左右滑动

 

 

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,

                ),

  

posted @ 2019-05-16 11:20  CrossPython  阅读(444)  评论(0编辑  收藏  举报