buildButton method
Implementation
Widget buildButton() {
return Padding(
padding: widget.margin ?? EdgeInsets.zero,
child: MaterialButton(
minWidth: widget.width,
padding:
widget.padding ??
const EdgeInsets.symmetric(vertical: 14, horizontal: 16),
onPressed: widget.enabled ? widget.onTap : null,
color: widget.color ?? Colors.white,
shape: widget.shapeBorder,
elevation: widget.elevation,
animationDuration: const Duration(milliseconds: 300),
height: widget.height,
disabledColor: widget.disabledColor,
focusColor: widget.focusColor,
hoverColor: widget.hoverColor,
splashColor: widget.splashColor,
disabledTextColor: widget.disabledTextColor,
child:
widget.child ??
Text(
widget.text.validate(),
style:
widget.textStyle ??
TextStyle(color: widget.textColor ?? textPrimaryColor),
),
),
);
}