CustomActionButton.elevated constructor

CustomActionButton.elevated({
  1. required VoidCallback? onPressed,
  2. required Widget child,
  3. Color? backgroundColor,
  4. Color? foregroundColor,
  5. Color? shadowColor,
  6. Color? splashColor,
  7. Color? disabledBackgroundColor,
  8. Color? disabledForegroundColor,
  9. Color? borderColor,
  10. double elevation = 2.0,
  11. double borderRadius = 8.0,
  12. BorderSide? side,
  13. OutlinedBorder? shape,
  14. double? width,
  15. double? height,
  16. EdgeInsetsGeometry? padding,
  17. EdgeInsetsGeometry? margin,
  18. InteractiveInkFeatureFactory? splashFactory,
})

Creates an elevated button.

The onPressed and child parameters are required.

Implementation

factory CustomActionButton.elevated({
  required VoidCallback? onPressed,
  required Widget child,
  Color? backgroundColor,
  Color? foregroundColor,
  Color? shadowColor,
  Color? splashColor,
  Color? disabledBackgroundColor,
  Color? disabledForegroundColor,
  Color? borderColor,
  double elevation = 2.0,
  double borderRadius = 8.0,
  BorderSide? side,
  OutlinedBorder? shape,
  double? width,
  double? height,
  EdgeInsetsGeometry? padding,
  EdgeInsetsGeometry? margin,
  InteractiveInkFeatureFactory? splashFactory,
}) {
  return CustomActionButton(
    buttonType: ButtonType.elevated,
    onPressed: onPressed,
    foregroundColor: foregroundColor,
    backgroundColor: backgroundColor,
    shadowColor: shadowColor,
    splashColor: splashColor,
    disabledBackgroundColor: disabledBackgroundColor,
    disabledBorderColor: disabledForegroundColor,
    borderColor: borderColor,
    elevation: elevation,
    borderRadius: borderRadius,
    shape: shape,
    width: width,
    height: height,
    padding: padding,
    margin: margin,
    splashFactory: splashFactory,
    child: child,
  );
}