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