copyWith method

SubtitleStyleConfig copyWith({
  1. TextStyle? textStyle,
  2. EdgeInsets? padding,
  3. EdgeInsets? margin,
  4. BoxDecoration? decoration,
  5. double? maxWidth,
  6. int? maxLines,
  7. TextOverflow? overflow,
})

创建当前样式配置的副本,可选覆盖部分属性。

Creates a copy of this style configuration with optionally overridden properties.

Implementation

SubtitleStyleConfig copyWith({
  TextStyle? textStyle,
  EdgeInsets? padding,
  EdgeInsets? margin,
  BoxDecoration? decoration,
  double? maxWidth,
  int? maxLines,
  TextOverflow? overflow,
}) {
  return SubtitleStyleConfig(
    textStyle: textStyle ?? this.textStyle,
    padding: padding ?? this.padding,
    margin: margin ?? this.margin,
    decoration: decoration ?? this.decoration,
    maxWidth: maxWidth ?? this.maxWidth,
    maxLines: maxLines ?? this.maxLines,
    overflow: overflow ?? this.overflow,
  );
}