primary static method
EcpCommonBtn
primary({
- required BuildContext context,
- required String label,
- required dynamic onClick(),
- TextStyle? style,
- EdgeInsets? padding,
- double? width,
- double? height,
- EdgeInsets? margin,
- Color? backgroundColor,
- Color? textColor,
Implementation
static EcpCommonBtn primary({
required BuildContext context,
required String label,
required Function() onClick,
TextStyle? style,
EdgeInsets? padding,
double? width,
double? height,
EdgeInsets? margin,
Color? backgroundColor,
Color? textColor,
}) {
return EcpCommonBtn(
label: label,
onClick: onClick,
style: style ??
context.textTheme.bodySmall?.copyWith(
color: textColor ?? context.colorScheme.surface,
),
padding: padding,
decoration: BoxDecoration(
color: backgroundColor ?? context.primaryColor,
borderRadius: BorderRadius.circular(Dimens.roundCornerRadius),
),
width: width,
height: height,
margin: margin,
);
}