primary static method

EcpCommonBtn primary({
  1. required BuildContext context,
  2. required String label,
  3. required dynamic onClick(),
  4. TextStyle? style,
  5. EdgeInsets? padding,
  6. double? width,
  7. double? height,
  8. EdgeInsets? margin,
  9. Color? backgroundColor,
  10. 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,
  );
}