MainButton.icon constructor

MainButton.icon({
  1. required String label,
  2. required IconType iconType,
  3. double? width = double.infinity,
  4. TextStyle? labelStyle,
  5. double? fontSize,
  6. double? maxWidth = 370,
  7. double borderRadius = 8,
  8. double height = 44,
  9. bool smallSize = false,
  10. double spaceBetweenIconAndText = 8.0,
  11. String? imagePath,
  12. IconData? icon,
  13. void onPressed()?,
  14. double? imageSize,
  15. double? opacity,
  16. Color? textColor,
  17. Color? backgroundColor,
  18. EdgeInsets? padding,
  19. Color? disableColor,
  20. bool isLoading = false,
  21. bool showShadow = false,
  22. bool isDisable = false,
  23. Color borderColor = Colors.transparent,
  24. MainButtonEnum type = MainButtonEnum.primary,
})

Implementation

factory MainButton.icon({
  required String label,
  required IconType iconType,
  double? width = double.infinity,
  TextStyle? labelStyle,
  double? fontSize,
  double? maxWidth = 370,
  double borderRadius = 8,
  double height = 44,
  bool smallSize = false,
  double spaceBetweenIconAndText = 8.0,
  String? imagePath,
  IconData? icon,
  void Function()? onPressed,
  double? imageSize,
  double? opacity,
  Color? textColor,
  Color? backgroundColor,
  EdgeInsets? padding,
  Color? disableColor,
  bool isLoading = false,
  bool showShadow = false,
  bool isDisable = false,
  Color borderColor = Colors.transparent,
  MainButtonEnum type = MainButtonEnum.primary,
}) {
  return _MainIconButton(
    width: width,
    labelStyle: labelStyle,
    maxWidth: maxWidth,
    iconType: iconType,
    label: label,
    imagePath: imagePath,
    icon: icon,
    imageSize: imageSize,
    onPressed: onPressed,
    height: height,
    padding: padding,
    borderRadius: borderRadius,
    backgroundColor: backgroundColor,
    textColor: textColor,
    disableColor: disableColor,
    isLoading: isLoading,
    showShadow: showShadow,
    isDisable: isDisable,
    borderColor: borderColor,
    smallSize: smallSize,
    opacity: opacity,
    contentPadding: spaceBetweenIconAndText,
    type: type,
    fontSize: fontSize,
  );
}