GTFButton.primary constructor
const
GTFButton.primary({
- Key? key,
- VoidCallback? onPressed,
- String text = "",
- String? icon,
- bool isEnable = true,
- int maxLines = 1,
- double? iconWidth,
- double? iconHeight,
- double iconTextMargin = 4,
- double borderWidth = 0,
- double pressedOpacity = 0.6,
- double radius = 4,
- double lineHeight = 1.4,
- double? fontSize = GTFFont.title,
- FontWeight? fontWeight = GTFFont.medium,
- TextAlign textAlign = TextAlign.center,
- GTFButtonIconAlignment iconAlignment = GTFButtonIconAlignment.left,
- EdgeInsets margin = EdgeInsets.zero,
- EdgeInsets padding = const EdgeInsets.all(8),
- BoxConstraints? constraints = const BoxConstraints(minHeight: 44),
- BorderRadius? borderRadius,
- Color backgroundColor = GTFColor.yellowPrimary,
- Color? disableBackgroundColor = GTFColor.grey3,
- Color? textColor = GTFColor.grey6,
- Color? disableTextColor = GTFColor.white,
- Color borderColor = GTFColor.transparent,
- 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);