CustomActionButton.flat constructor

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

Creates a flat button.

The onPressed and child parameters are required.

Implementation

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