MainButton.icon constructor
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 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,
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,
);
}