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,

                ),

  

转载于:https://www.cnblogs.com/pythonClub/p/10874518.html

Logo

开源鸿蒙跨平台开发社区汇聚开发者与厂商,共建“一次开发,多端部署”的开源生态,致力于降低跨端开发门槛,推动万物智联创新。

更多推荐