copyWith method

ButtonStyle copyWith({
  1. ButtonState<TextStyle?>? textStyle,
  2. ButtonState<Color?>? backgroundColor,
  3. ButtonState<Color?>? foregroundColor,
  4. ButtonState<Color?>? shadowColor,
  5. ButtonState<double?>? elevation,
  6. ButtonState<EdgeInsetsGeometry?>? padding,
  7. ButtonState<ShapeBorder?>? shape,
  8. ButtonState<double?>? iconSize,
})

Implementation

ButtonStyle copyWith({
  ButtonState<TextStyle?>? textStyle,
  ButtonState<Color?>? backgroundColor,
  ButtonState<Color?>? foregroundColor,
  ButtonState<Color?>? shadowColor,
  ButtonState<double?>? elevation,
  ButtonState<EdgeInsetsGeometry?>? padding,
  ButtonState<ShapeBorder?>? shape,
  ButtonState<double?>? iconSize,
}) {
  return ButtonStyle(
    textStyle: textStyle ?? this.textStyle,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    foregroundColor: foregroundColor ?? this.foregroundColor,
    shadowColor: shadowColor ?? this.shadowColor,
    elevation: elevation ?? this.elevation,
    padding: padding ?? this.padding,
    shape: shape ?? this.shape,
    iconSize: iconSize ?? this.iconSize,
  );
}