首页 > 解决方案 > 使用溢出框移动Widget后,原来的手势会丢失。

问题描述

  OverflowBox(
        maxHeight: Screens.height * 0.4,
        // alignment: Alignment.topCenter,
        alignment: animation.value,
        child: Container(
          decoration: BoxDecoration(
            color: Colors.white,
            boxShadow: boxShadow,
            borderRadius: BorderRadius.vertical(
              top: Radius.circular(30.w),
            ),
          ),
          padding: EdgeInsets.all(30.w).copyWith(top: 0, bottom: bottomButtonPadding),
          child: Column(
            children: <Widget>[
              PostButton(
                onTap: () {
                 //do something
                },
                child: Padding(
                  padding: EdgeInsets.symmetric(vertical: 15.h),
                  child: Glide.loadAssetIcon('icon_map_touch.png'),
                ),
              ),
              widget.child,
            ],
          ),
        ),
      )

动画完成后,OnTap无效。有人说overlay可以解决这个问题,但是我还没有找到使用方法。有谁知道解决方案?

标签: flutterflutter-layout

解决方案


推荐阅读