LoadingButton constructor

const LoadingButton({
  1. Key? key,
  2. required LoadingButtonType type,
  3. bool animated = false,
  4. required VoidCallback? onPressed,
  5. LoadingButtonState state = LoadingButtonState.idle,
  6. VoidCallback? onLongPress,
  7. ValueChanged<bool>? onHover,
  8. ValueChanged<bool>? onFocusChange,
  9. ButtonStyle? style,
  10. FocusNode? focusNode,
  11. WidgetStatesController? statesController,
  12. Size? expandedSize,
  13. Size? loadingSize,
  14. 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,
});