XButton.text constructor

XButton.text({
  1. required String text,
  2. double fontSize = 16,
  3. Color color = Colors.white,
  4. FontWeight fontWeight = FontWeight.normal,
  5. TextAlign textAlign = TextAlign.center,
  6. String? fontFamily,
  7. TextStyle? textStyle,
  8. VoidCallback? onPressed,
  9. VoidCallback? onLongPressed,
  10. XButtonType? buttonType,
  11. XButtonShape? buttonShape,
  12. BorderRadiusGeometry? borderRadius,
  13. Color? overlayColor,
  14. Size? minSize,
  15. EdgeInsetsGeometry? padding,
})

Implementation

XButton.text(
    {required String text,
    double fontSize = 16,
    Color color = Colors.white,
    FontWeight fontWeight = FontWeight.normal,
    TextAlign textAlign = TextAlign.center,
    String? fontFamily,
    TextStyle? textStyle,
    this.onPressed,
    this.onLongPressed,
    this.buttonType,
    this.buttonShape,
    this.borderRadius,
    this.overlayColor,
    this.minSize,
    this.padding})
    : child = Text(text,
          style: textStyle ??
              TextStyle(
                  fontSize: fontSize,
                  fontWeight: fontWeight,
                  color: color,
                  fontFamily: fontFamily),
          textAlign: textAlign);