AButton constructor
const
AButton({
- Key? key,
- String? text,
- String? textTitle,
- TextStyle? textStyle,
- TextAlign textAlign = TextAlign.center,
- IconData? icon,
- required dynamic onPressed()?,
- bool disabled = false,
- bool loading = false,
- Color? color,
- bool upperCase = true,
- Color? borderColor,
- double? borderRadius,
- double fontSize = 12,
- double iconSize = 18,
- FontWeight? fontWeight,
- double? height,
- double? width,
- double elevation = 2,
- IconData? landingIcon,
- Color? landingColor,
- Widget? landingImage,
- IconData? trailingIcon,
- Color? trailingColor,
- EdgeInsets padding = const EdgeInsets.all(10),
- EdgeInsets margin = EdgeInsets.zero,
- Color? textColor,
- bool outlined = false,
- MainAxisAlignment rowAlignment = MainAxisAlignment.center,
- bool singleLine = false,
- bool expanded = false,
- Widget? suffixChip,
- Widget? title,
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);