RoundButton constructor
RoundButton({
- required String text,
- bool isEnabled = true,
- required dynamic onTap(),
- dynamic onTapDisabled()?,
- double? width,
- double height = 50.0,
- double? borderRadius,
- bool isFullWidth = false,
- bool wrapContent = true,
- RoundButtonTheme? theme,
- Color? shadowColor,
- Color? textColor,
- Color? bgColor,
- Color? borderColor,
- FontWeight fontWeight = FontWeight.w500,
- double fontSize = 16,
- double sidePadding = 15.0,
- double rightPadding = 0.0,
- double leftPadding = 0.0,
- double leftWidgetLeftPadding = 18.0,
- bool leftWidgetOnStack = true,
- double sideMargin = 0.0,
- Widget? leftWidget,
- Widget? rightWidget,
- TextAlign textAlign = TextAlign.start,
- Key? key,
Implementation
RoundButton(
{required this.text,
this.isEnabled = true,
required this.onTap,
this.onTapDisabled,
this.width,
this.height = 50.0,
this.borderRadius,
this.isFullWidth = false,
this.wrapContent = true,
this.theme,
Color? shadowColor,
Color? textColor,
Color? bgColor,
Color? borderColor,
this.fontWeight = FontWeight.w500,
this.fontSize = 16,
this.sidePadding = 15.0,
this.rightPadding = 0.0,
this.leftPadding = 0.0,
this.leftWidgetLeftPadding = 18.0,
this.leftWidgetOnStack = true,
this.sideMargin = 0.0,
this.leftWidget,
this.rightWidget,
this.textAlign = TextAlign.start,
Key? key})
: shadowColor = shadowColor ?? theme?.shadowColor ?? Colors.transparent,
textColor = textColor ?? theme?.textColor ?? Colors.white,
bgColor = bgColor ?? theme?.bgColor ?? AppColors.blue,
borderColor = borderColor ?? theme?.borderColor ?? Colors.transparent,
super(key: key);