copyWith method

LaunchStyle copyWith({
  1. Color? backgroundColor,
  2. Color? textColor,
  3. Color? iconColor,
  4. double? borderRadius,
  5. EdgeInsetsGeometry? padding,
  6. double? fontSize,
  7. FontWeight? fontWeight,
  8. double? height,
  9. double? iconWidth,
  10. double? iconHeight,
  11. BoxFit? iconFit,
  12. bool? isOutlined,
  13. double? borderWidth,
  14. Color? borderColor,
  15. bool? showUnderline,
  16. LaunchThemePreset? themePreset,
  17. bool? isAnimated,
  18. Duration? animationDuration,
})

Creates a copy of this style but with the given fields replaced with new values.

Implementation

LaunchStyle copyWith({
  Color? backgroundColor,
  Color? textColor,
  Color? iconColor,
  double? borderRadius,
  EdgeInsetsGeometry? padding,
  double? fontSize,
  FontWeight? fontWeight,
  double? height,
  double? iconWidth,
  double? iconHeight,
  BoxFit? iconFit,
  bool? isOutlined,
  double? borderWidth,
  Color? borderColor,
  bool? showUnderline,
  LaunchThemePreset? themePreset,
  bool? isAnimated,
  Duration? animationDuration,
}) {
  return LaunchStyle(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    textColor: textColor ?? this.textColor,
    iconColor: iconColor ?? this.iconColor,
    borderRadius: borderRadius ?? this.borderRadius,
    padding: padding ?? this.padding,
    fontSize: fontSize ?? this.fontSize,
    fontWeight: fontWeight ?? this.fontWeight,
    height: height ?? this.height,
    iconWidth: iconWidth ?? this.iconWidth,
    iconHeight: iconHeight ?? this.iconHeight,
    iconFit: iconFit ?? this.iconFit,
    isOutlined: isOutlined ?? this.isOutlined,
    borderWidth: borderWidth ?? this.borderWidth,
    borderColor: borderColor ?? this.borderColor,
    showUnderline: showUnderline ?? this.showUnderline,
    themePreset: themePreset ?? this.themePreset,
    isAnimated: isAnimated ?? this.isAnimated,
    animationDuration: animationDuration ?? this.animationDuration,
  );
}