normal method

Widget normal(
  1. BuildContext context
)

Implementation

Widget normal(BuildContext context) {
  Widget wid = Container(
    alignment: widget.alignment,
    width: widget.width,
    height: widget.heigth,
    margin: widget.margin,
    padding: widget.padding,
    color: widget.decoration == null ? widget.color : null,
    decoration: widget.decoration,
    child: childBuild(context),
  );

  Widget ges = GestureDetector(
    behavior: HitTestBehavior.translucent,
    onLongPress: widget.onLongPress != null
        ? () {
            if (widget.hiddenKeepFrame == true ||
                widget.hiddenClearFrame == true) {
              //隐藏状态不能点击
            } else {
              if (widget.onLongPress != null) {
                repeatedClickJudgment(widget.onLongPress);
              }
            }
          }
        : null,
    onTap: widget.onClick != null
        ? () {
            if (widget.hiddenKeepFrame == true ||
                widget.hiddenClearFrame == true) {
              //隐藏状态不能点击
            } else {
              if (widget.onClick != null) {
                repeatedClickJudgment(widget.onClick);
              }
            }
          }
        : null,
    child: widget.unconstrainedBox == true
        ? UnconstrainedBox(
            child: wid,
          )
        : wid,
  );

  return ges;
}