DDSButton constructor

const DDSButton({
  1. Key? key,
  2. required String label,
  3. required VoidCallback? onPressed,
  4. ButtonSize size = ButtonSize.small,
  5. ButtonType type = ButtonType.primary,
  6. ButtonShape shape = ButtonShape.rectangle,
  7. EdgeInsetsGeometry padding = const EdgeInsets.all(12.0),
  8. double? iconButtonSize = 32.0,
  9. Widget? startIcon,
  10. Widget? endIcon,
  11. Widget? iconButton,
  12. double? width,
  13. double? height,
  14. double minWidth = 0.0,
  15. double borderWidth = 1.0,
  16. bool disabled = false,
  17. bool loading = false,
  18. double loaderThickness = 4.0,
  19. double loaderLabelSpacing = 4.0,
  20. TextStyle? labelStyle,
  21. Color? iconButtonBorderColor = const Color(0xFFC44117),
  22. Color? iconButtonBackgroundColor = const Color(0xFFC44117),
  23. Color? disabledIconButtonBackgroundColor = const Color(0x66F15A29),
  24. Color? iconButtonPressedBackgroundColor = const Color(0xFFC44117),
  25. Color? disabledIconButtonBorderColor = const Color(0xFFC44117),
  26. Color? primaryButtonPressedColor = const Color(0xFFC44117),
  27. Color? secondaryButtonPressedColor = const Color(0xFFFFF0EB),
  28. Color? tertiaryButtonPressedColor = const Color(0xFFFFF0EB),
  29. Color? primaryButtonBackgroundColor = const Color(0xFFF15A29),
  30. Color? secondaryButtonBackgroundColor = Colors.white,
  31. Color? disabledPrimaryButtonBackgroundColor = const Color(0x66F15A29),
  32. Color? disabledSecondaryButtonBackgroundColor = Colors.white,
  33. Color? primaryButtonTextColor = Colors.white,
  34. Color? secondaryButtonTextColor = const Color(0xFFF15A29),
  35. Color? disabledPrimaryButtonTextColor = Colors.white,
  36. Color? tertiaryButtonTextColor = const Color(0xFFF15A29),
  37. Color? disabledTertiaryButtonTextColor = const Color(0x66F15A29),
  38. Color? disabledSecondaryButtonTextColor = const Color(0x66F15A29),
  39. Color? secondaryButtonBorderColor = const Color(0xFFF15A29),
  40. Color? disabledSecondaryButtonBorderColor = const Color(0x66FF835B),
  41. Color? labelPressedColor,
  42. EdgeInsetsGeometry iconPadding = const EdgeInsets.only(right: 8.0),
  43. EdgeInsetsGeometry labelPadding = const EdgeInsets.only(left: 8.0, right: 8.0),
  44. Color? startIconPressedColor,
  45. Color? startIconColor,
  46. Color? endIconPressedColor,
  47. Color? endIconColor,
  48. Color? iconButtonIconPressedColor,
  49. Color? iconButtonIconColor,
  50. Gradient? gradientBackgroundColor,
  51. List<BoxShadow>? boxShadow,
})

Implementation

const DDSButton(
    {Key? key,
    required this.label,
    required this.onPressed,
    this.size = ButtonSize.small,
    this.type = ButtonType.primary,
    this.shape = ButtonShape.rectangle,
    this.padding = const EdgeInsets.all(12.0),
    this.iconButtonSize = 32.0,
    this.startIcon,
    this.endIcon,
    this.iconButton,
    this.width,
    this.height,
    this.minWidth = 0.0,
    this.borderWidth = 1.0,
    this.disabled = false,
    this.loading = false,
    this.loaderThickness = 4.0,
    this.loaderLabelSpacing = 4.0,
    this.labelStyle,
    this.iconButtonBorderColor = const Color(0xFFC44117),
    this.iconButtonBackgroundColor = const Color(0xFFC44117),
    this.disabledIconButtonBackgroundColor = const Color(0x66F15A29),
    this.iconButtonPressedBackgroundColor = const Color(0xFFC44117),
    this.disabledIconButtonBorderColor = const Color(0xFFC44117),
    this.primaryButtonPressedColor = const Color(0xFFC44117),
    this.secondaryButtonPressedColor = const Color(0xFFFFF0EB),
    this.tertiaryButtonPressedColor = const Color(0xFFFFF0EB),
    this.primaryButtonBackgroundColor = const Color(0xFFF15A29),
    this.secondaryButtonBackgroundColor = Colors.white,
    this.disabledPrimaryButtonBackgroundColor = const Color(0x66F15A29),
    this.disabledSecondaryButtonBackgroundColor = Colors.white,
    this.primaryButtonTextColor = Colors.white,
    this.secondaryButtonTextColor = const Color(0xFFF15A29),
    this.disabledPrimaryButtonTextColor = Colors.white,
    this.tertiaryButtonTextColor = const Color(0xFFF15A29),
    this.disabledTertiaryButtonTextColor = const Color(0x66F15A29),
    this.disabledSecondaryButtonTextColor = const Color(0x66F15A29),
    this.secondaryButtonBorderColor = const Color(0xFFF15A29),
    this.disabledSecondaryButtonBorderColor = const Color(0x66FF835B),
    this.labelPressedColor,
    this.iconPadding = const EdgeInsets.only(right: 8.0),
    this.labelPadding = const EdgeInsets.only(left: 8.0, right: 8.0),
    this.startIconPressedColor,
    this.startIconColor,
    this.endIconPressedColor,
    this.endIconColor,
    this.iconButtonIconPressedColor,
    this.iconButtonIconColor,
    this.gradientBackgroundColor,
    this.boxShadow})
    : super(key: key);