PrimaryButton constructor
const
PrimaryButton({
- Key? key,
- required String label,
- required dynamic onTap(),
- Widget? icon,
- Color? backgroundColor,
- Color? textColor,
- BorderSide? borderSide,
- Size? fixedSize,
- double? borderRadius,
- bool isDisabled = false,
- Function? onDisabledTap,
- IconAlignment? iconAlignment,
- bool hapticFeedback = true,
- bool isExpanded = true,
- double fontSize = 16,
This button uses TextTheme.labelMedium for the text style.
It has a default height of 60 and a default border radius of 260.
The button has a default background color of colorScheme.primary.
The button has a default text color of colorScheme.onPrimary.
The button has a default border radius of 260.
The button has a default border side of BorderSide.none.
The button has a default fixed size of Size.fromHeight(60).
The button has a default icon alignment of IconAlignment.left.
The button has a default haptic feedback of true.
The button has a default isExpanded of true.
The button has a default isDisabled of false.
The button has a default font size of 16.
Implementation
const PrimaryButton({
super.key,
required this.label,
required this.onTap,
this.icon,
this.backgroundColor,
this.textColor,
this.borderSide,
this.fixedSize,
this.borderRadius,
this.isDisabled = false,
this.onDisabledTap,
this.iconAlignment,
this.hapticFeedback = true,
this.isExpanded = true,
this.fontSize = 16,
});