BaseButton constructor

const BaseButton({
  1. Key? key,
  2. String? text,
  3. TextAlign textAlign = TextAlign.center,
  4. double textFontSize = 16,
  5. double? textLetterSpacing,
  6. double? width,
  7. double? height,
  8. Border? border,
  9. BorderRadius? borderRadius,
  10. EdgeInsetsGeometry? padding,
  11. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.center,
  12. Color? textColor,
  13. Color? borderColor,
  14. Color? backgroundColor,
  15. Color? hoverTextColor,
  16. Color? hoverBorderColor,
  17. Color? hoverBackgroundColor,
  18. Color? activeTextColor,
  19. Color? activeBorderColor,
  20. Color? activeBackgroundColor,
  21. bool isLoading = false,
  22. bool isActive = false,
  23. Widget? child,
  24. Widget builder({
    1. required Color backgroundColor,
    2. Animation? borderAnimation,
    3. required bool isHovering,
    4. Animation? textAnimation,
    5. required Color textColor,
    6. required AnimationController textController,
    })?,
  25. void onPressed()?,
})

Implementation

const BaseButton({
  super.key,

  // general
  this.text,
  this.textAlign = TextAlign.center,
  this.textFontSize = 16,
  this.textLetterSpacing,

  // appearance
  this.width,
  this.height,
  this.border,
  this.borderRadius,
  this.padding,
  this.mainAxisAlignment = MainAxisAlignment.center,

  // colors
  this.textColor,
  this.borderColor,
  this.backgroundColor,
  this.hoverTextColor,
  this.hoverBorderColor,
  this.hoverBackgroundColor,
  this.activeTextColor,
  this.activeBorderColor,
  this.activeBackgroundColor,

  // predicates
  this.isLoading = false,
  this.isActive = false,

  // methods
  this.child,
  this.builder,
  this.onPressed,
});