primaryStyle static method

ZeroButtonStyle primaryStyle({
  1. ZeroSizeType? buttonSizeType,
  2. ZeroButtonRadiusType? buttonRadiusType,
  3. Color? foregroundColor,
  4. Color? backgroundColor,
  5. Color? disabledForegroundColor,
  6. Color? disabledBackgroundColor,
  7. Color? shadowColor,
  8. Color? surfaceTintColor,
  9. double? elevation,
  10. TextStyle? textStyle,
  11. EdgeInsetsGeometry? padding,
  12. Size? minimumSize,
  13. Size? fixedSize,
  14. Size? maximumSize,
  15. BorderSide? side,
  16. OutlinedBorder? shape,
  17. VisualDensity? visualDensity,
  18. MaterialTapTargetSize? tapTargetSize,
  19. Duration? animationDuration,
  20. bool? enableFeedback,
  21. AlignmentGeometry? alignment,
  22. InteractiveInkFeatureFactory? splashFactory,
  23. Color? animatingColor,
})

primaryStyle is the function that will be used to create ZeroButtonStyle with primary color

Implementation

static ZeroButtonStyle primaryStyle({
  ZeroSizeType? buttonSizeType,
  ZeroButtonRadiusType? buttonRadiusType,
  Color? foregroundColor,
  Color? backgroundColor,
  Color? disabledForegroundColor,
  Color? disabledBackgroundColor,
  Color? shadowColor,
  Color? surfaceTintColor,
  double? elevation,
  TextStyle? textStyle,
  EdgeInsetsGeometry? padding,
  Size? minimumSize,
  Size? fixedSize,
  Size? maximumSize,
  BorderSide? side,
  OutlinedBorder? shape,
  VisualDensity? visualDensity,
  MaterialTapTargetSize? tapTargetSize,
  Duration? animationDuration,
  bool? enableFeedback,
  AlignmentGeometry? alignment,
  InteractiveInkFeatureFactory? splashFactory,
  Color? animatingColor,
}) {
  return ZeroButtonStyle(
    backgroundColor: backgroundColor ?? ZeroColors.primary,
    foregroundColor: foregroundColor ?? ZeroColors.primary[8],
    disabledBackgroundColor: disabledBackgroundColor,
    disabledForegroundColor: disabledForegroundColor,
    shadowColor: shadowColor,
    surfaceTintColor: surfaceTintColor ?? ZeroColors.primary[3],
    elevation: elevation ?? 0,
    textStyle: textStyle,
    padding: padding ?? buttonSizeType?.padding,
    shape: shape ??
        RoundedRectangleBorder(
          borderRadius: buttonRadiusSize(
              buttonRadiusType ?? ZeroButtonRadiusType.rectangle),
        ),
    visualDensity: visualDensity,
    tapTargetSize: tapTargetSize ?? MaterialTapTargetSize.shrinkWrap,
    animationDuration: animationDuration,
    enableFeedback: enableFeedback,
    alignment: alignment,
    splashFactory: splashFactory,
    animatingColor: animatingColor ?? ZeroColors.primary[3],
    side: side,
    fixedSize: fixedSize,
    maximumSize: maximumSize,
    minimumSize: minimumSize,
  );
}