CustomActionButton.longPress constructor

CustomActionButton.longPress({
  1. Key? key,
  2. required VoidCallback? onPressed,
  3. required VoidCallback? onLongPress,
  4. required Widget child,
  5. Widget? icon,
  6. double iconSpacing = 8.0,
  7. Color? backgroundColor,
  8. Color? foregroundColor,
  9. Color? shadowColor,
  10. Color? splashColor,
  11. Color? disabledBackgroundColor,
  12. Color? disabledBorderColor,
  13. Color? disabledForegroundColor,
  14. Color? borderColor,
  15. double elevation = 2.0,
  16. double borderRadius = 8.0,
  17. BorderSide? side,
  18. OutlinedBorder? shape,
  19. double? width,
  20. double? height,
  21. double minHeight = 60.0,
  22. EdgeInsetsGeometry? padding,
  23. EdgeInsetsGeometry? margin,
  24. Gradient? backgroundGradient,
  25. Gradient? disabledBackgroundGradient,
  26. InteractiveInkFeatureFactory? splashFactory,
  27. MaterialTapTargetSize? tapTargetSize,
})

Creates a long-press button.

Implementation

factory CustomActionButton.longPress({
  Key? key,
  required VoidCallback? onPressed,
  required VoidCallback? onLongPress,
  required Widget child,
  Widget? icon,
  double iconSpacing = 8.0,
  Color? backgroundColor,
  Color? foregroundColor,
  Color? shadowColor,
  Color? splashColor,
  Color? disabledBackgroundColor,
  Color? disabledBorderColor,
  Color? disabledForegroundColor,
  Color? borderColor,
  double elevation = 2.0,
  double borderRadius = 8.0,
  BorderSide? side,
  OutlinedBorder? shape,
  double? width,
  double? height,
  double minHeight = 60.0,
  EdgeInsetsGeometry? padding,
  EdgeInsetsGeometry? margin,
  Gradient? backgroundGradient,
  Gradient? disabledBackgroundGradient,
  InteractiveInkFeatureFactory? splashFactory,
  MaterialTapTargetSize? tapTargetSize,
}) {
  return CustomActionButton(
    key: key,
    buttonType: ButtonType.longPress,
    onPressed: onPressed,
    onLongPress: onLongPress,
    foregroundColor: foregroundColor,
    backgroundColor: backgroundColor,
    shadowColor: shadowColor,
    splashColor: splashColor,
    disabledBackgroundColor: disabledBackgroundColor,
    disabledBorderColor: disabledBorderColor,
    disabledForegroundColor: disabledForegroundColor,
    borderColor: borderColor,
    elevation: elevation,
    borderRadius: borderRadius,
    shape: shape,
    width: width,
    height: height,
    minHeight: minHeight,
    padding: padding,
    margin: margin,
    splashFactory: splashFactory,
    backgroundGradient: backgroundGradient,
    disabledBackgroundGradient: disabledBackgroundGradient,
    icon: icon,
    iconSpacing: iconSpacing,
    tapTargetSize: tapTargetSize,
    child: child,
  );
}