AButton constructor

const AButton({
  1. Key? key,
  2. String? text,
  3. String? textTitle,
  4. TextStyle? textStyle,
  5. TextAlign textAlign = TextAlign.center,
  6. IconData? icon,
  7. required dynamic onPressed()?,
  8. bool disabled = false,
  9. bool loading = false,
  10. Color? color,
  11. bool upperCase = true,
  12. Color? borderColor,
  13. double? borderRadius,
  14. double fontSize = 12,
  15. double iconSize = 18,
  16. FontWeight? fontWeight,
  17. double? height,
  18. double? width,
  19. double elevation = 2,
  20. IconData? landingIcon,
  21. Color? landingColor,
  22. Widget? landingImage,
  23. IconData? trailingIcon,
  24. Color? trailingColor,
  25. EdgeInsets padding = const EdgeInsets.all(10),
  26. EdgeInsets margin = EdgeInsets.zero,
  27. Color? textColor,
  28. bool outlined = false,
  29. MainAxisAlignment rowAlignment = MainAxisAlignment.center,
  30. bool singleLine = false,
  31. bool expanded = false,
  32. Widget? suffixChip,
  33. Widget? title,
  34. Widget? footer,
})

Implementation

const AButton({
  super.key,
  this.text,
  this.textTitle,
  this.textStyle,
  this.textAlign = TextAlign.center,
  this.icon,
  required this.onPressed,
  this.disabled = false,
  this.loading = false,
  this.color,
  this.upperCase = true,
  this.borderColor,
  this.borderRadius,
  this.fontSize = 12,
  this.iconSize = 18,
  this.fontWeight,
  this.height,
  this.width,
  this.elevation = 2,
  this.landingIcon,
  this.landingColor,
  this.landingImage,
  this.trailingIcon,
  this.trailingColor,
  this.padding = const EdgeInsets.all(10),
  this.margin = EdgeInsets.zero,
  this.textColor,
  this.outlined = false,
  this.rowAlignment = MainAxisAlignment.center,
  this.singleLine = false,
  this.expanded = false,
  this.suffixChip,
  this.title,
  this.footer,
}) : assert(height == null || height >= 30),
      assert(text != null || icon != null),
      assert(text == null || icon == null);