GTFButton.primary constructor

const GTFButton.primary({
  1. Key? key,
  2. VoidCallback? onPressed,
  3. String text = "",
  4. String? icon,
  5. bool isEnable = true,
  6. int maxLines = 1,
  7. double? iconWidth,
  8. double? iconHeight,
  9. double iconTextMargin = 4,
  10. double borderWidth = 0,
  11. double pressedOpacity = 0.6,
  12. double radius = 4,
  13. double lineHeight = 1.4,
  14. double? fontSize = GTFFont.title,
  15. FontWeight? fontWeight = GTFFont.medium,
  16. TextAlign textAlign = TextAlign.center,
  17. GTFButtonIconAlignment iconAlignment = GTFButtonIconAlignment.left,
  18. EdgeInsets margin = EdgeInsets.zero,
  19. EdgeInsets padding = const EdgeInsets.all(8),
  20. BoxConstraints? constraints = const BoxConstraints(minHeight: 44),
  21. BorderRadius? borderRadius,
  22. Color backgroundColor = GTFColor.yellowPrimary,
  23. Color? disableBackgroundColor = GTFColor.grey3,
  24. Color? textColor = GTFColor.grey6,
  25. Color? disableTextColor = GTFColor.white,
  26. Color borderColor = GTFColor.transparent,
  27. Color? disableBorderColor,
})

Implementation

const GTFButton.primary({
  Key? key,
  this.onPressed,
  this.text = "",
  this.icon,
  this.isEnable = true,
  this.maxLines = 1,
  this.iconWidth,
  this.iconHeight,
  this.iconTextMargin = 4,
  this.borderWidth = 0,
  this.pressedOpacity = 0.6,
  this.radius = 4,
  this.lineHeight = 1.4,
  this.fontSize = GTFFont.title,
  this.fontWeight = GTFFont.medium,
  this.textAlign = TextAlign.center,
  this.iconAlignment = GTFButtonIconAlignment.left,
  this.margin = EdgeInsets.zero,
  this.padding = const EdgeInsets.all(8),
  this.constraints = const BoxConstraints(minHeight: 44),
  this.borderRadius,
  this.backgroundColor = GTFColor.yellowPrimary,
  this.disableBackgroundColor = GTFColor.grey3,
  this.textColor = GTFColor.grey6,
  this.disableTextColor = GTFColor.white,
  this.borderColor = GTFColor.transparent,
  this.disableBorderColor,
}) : super(key: key);