LoadingButton constructor
const
LoadingButton({
- Key? key,
- required LoadingButtonType type,
- bool animated = false,
- required VoidCallback? onPressed,
- LoadingButtonState state = LoadingButtonState.idle,
- VoidCallback? onLongPress,
- ValueChanged<
bool> ? onHover, - ValueChanged<
bool> ? onFocusChange, - ButtonStyle? style,
- FocusNode? focusNode,
- WidgetStatesController? statesController,
- Size? expandedSize,
- Size? loadingSize,
- required Widget? child,
Create a LoadingButton.
The state
and animated
arguments must not be null.
The animated
field is currently unused, but reserved
for next implementations (es: enable/disable button animation)
Other parameters are the same of ElevatedButton, FilledButton, FilledButton.tonal and OutlinedButton
Implementation
const LoadingButton({
super.key,
required this.type,
this.animated = false,
required this.onPressed,
this.state = LoadingButtonState.idle,
this.onLongPress,
this.onHover,
this.onFocusChange,
this.style,
this.focusNode,
this.statesController,
this.expandedSize,
this.loadingSize,
required this.child,
});