copyWith method

TextStyleConfig copyWith({
  1. double? fontSize,
  2. FontWeight? fontWeight,
  3. Color? color,
  4. FontStyle? fontStyle,
  5. double? letterSpacing,
  6. double? height,
})

复制并修改

Implementation

TextStyleConfig copyWith({
  double? fontSize,
  FontWeight? fontWeight,
  Color? color,
  FontStyle? fontStyle,
  double? letterSpacing,
  double? height,
}) {
  return TextStyleConfig(
    fontSize: fontSize ?? this.fontSize,
    fontWeight: fontWeight ?? this.fontWeight,
    color: color ?? this.color,
    fontStyle: fontStyle ?? this.fontStyle,
    letterSpacing: letterSpacing ?? this.letterSpacing,
    height: height ?? this.height,
  );
}