CustomActionButton.longPress constructor

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

Creates a long-press button.

The onPressed, onLongPress, and child parameters are required.

Implementation

factory CustomActionButton.longPress({
  required VoidCallback? onPressed,
  required VoidCallback? onLongPress,
  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.longPress,
    onPressed: onPressed,
    onLongPress: onLongPress,
    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,
  );
}