bgWidget method

  1. @protected
Widget bgWidget({
  1. Widget? child,
})

按钮背景

Implementation

@protected
Widget bgWidget({Widget? child}) {
  Widget contentWidget = Container(
      margin: this.margin,
      padding: this.padding,
      alignment: this.alignment ?? Alignment.center,
      decoration: this.decoration,
      width: this.width,
      height: this.height,
      child: child);

  return GestureDetector(
      behavior: this.behavior,
      onTap: this.onTapFunc,
      onLongPress: this.onLongPress,
      child: (this.useConstrained)
          ? contentWidget
          : UnconstrainedBox(child: contentWidget));
}