RoundButton constructor

RoundButton({
  1. required String text,
  2. bool isEnabled = true,
  3. required dynamic onTap(),
  4. dynamic onTapDisabled()?,
  5. double? width,
  6. double height = 50.0,
  7. double? borderRadius,
  8. bool isFullWidth = false,
  9. bool wrapContent = true,
  10. RoundButtonTheme? theme,
  11. Color? shadowColor,
  12. Color? textColor,
  13. Color? bgColor,
  14. Color? borderColor,
  15. FontWeight fontWeight = FontWeight.w500,
  16. double fontSize = 16,
  17. double sidePadding = 15.0,
  18. double rightPadding = 0.0,
  19. double leftPadding = 0.0,
  20. double leftWidgetLeftPadding = 18.0,
  21. bool leftWidgetOnStack = true,
  22. double sideMargin = 0.0,
  23. Widget? leftWidget,
  24. Widget? rightWidget,
  25. TextAlign textAlign = TextAlign.start,
  26. Key? key,
})

Implementation

RoundButton(
    {required this.text,
    this.isEnabled = true,
    required this.onTap,
    this.onTapDisabled,
    this.width,
    this.height = 50.0,
    this.borderRadius,
    this.isFullWidth = false,
    this.wrapContent = true,
    this.theme,
    Color? shadowColor,
    Color? textColor,
    Color? bgColor,
    Color? borderColor,
    this.fontWeight = FontWeight.w500,
    this.fontSize = 16,
    this.sidePadding = 15.0,
    this.rightPadding = 0.0,
    this.leftPadding = 0.0,
    this.leftWidgetLeftPadding = 18.0,
    this.leftWidgetOnStack = true,
    this.sideMargin = 0.0,
    this.leftWidget,
    this.rightWidget,
    this.textAlign = TextAlign.start,
    Key? key})
    : shadowColor = shadowColor ?? theme?.shadowColor ?? Colors.transparent,
      textColor = textColor ?? theme?.textColor ?? Colors.white,
      bgColor = bgColor ?? theme?.bgColor ?? AppColors.blue,
      borderColor = borderColor ?? theme?.borderColor ?? Colors.transparent,
      super(key: key);