SinglePressButton constructor

const SinglePressButton({
  1. Key? key,
  2. required Widget child,
  3. required Future<void> onPressed(),
  4. EdgeInsetsGeometry? padding,
  5. EdgeInsetsGeometry? margin,
  6. Color? color,
  7. Color? disabledColor,
  8. double borderRadius = 8.0,
  9. TextStyle? textStyle,
  10. double? elevation,
  11. OutlinedBorder? shape,
  12. bool showLoadingIndicator = false,
  13. Color? loadingIndicatorColor,
  14. VoidCallback? onStartProcessing,
  15. VoidCallback? onFinishProcessing,
  16. void onError(
    1. Object error
    )?,
})

Creates a SinglePressButton.

The child and onPressed parameters are required. The borderRadius defaults to 8.0, and showLoadingIndicator defaults to false.

Implementation

const SinglePressButton({
  super.key,
  required this.child,
  required this.onPressed,
  this.padding,
  this.margin,
  this.color,
  this.disabledColor,
  this.borderRadius = 8.0,
  this.textStyle,
  this.elevation,
  this.shape,
  this.showLoadingIndicator = false,
  this.loadingIndicatorColor,
  this.onStartProcessing,
  this.onFinishProcessing,
  this.onError,
});