ModulaLoadingButton constructor
const
ModulaLoadingButton({
- Key? key,
- VoidCallback? onPressed,
- Future<
void> onPressedAsync()?, - String? label,
- Widget? icon,
- IconPlacement iconPlacement = IconPlacement.left,
- TextStyle? labelStyle,
- ModulaButtonSize size = ModulaButtonSize.medium,
- bool isDisabled = false,
- double? borderRadius,
- Color? backgroundColor,
- Color? foregroundColor,
- Color? loadingColor,
- TextAlign textAlign = TextAlign.center,
- EdgeInsetsGeometry? padding,
- double? elevation,
- String? loadingText,
- Widget? loadingIndicator,
- bool showIconWhileLoading = false,
Implementation
const ModulaLoadingButton({
super.key,
this.onPressed,
this.onPressedAsync,
this.label,
this.icon,
this.iconPlacement = IconPlacement.left,
this.labelStyle,
this.size = ModulaButtonSize.medium,
this.isDisabled = false,
this.borderRadius,
this.backgroundColor,
this.foregroundColor,
this.loadingColor,
this.textAlign = TextAlign.center,
this.padding,
this.elevation,
this.loadingText,
this.loadingIndicator,
this.showIconWhileLoading = false,
}) : assert(
onPressed != null || onPressedAsync != null,
'Either onPressed or onPressedAsync must be provided',
);