copyWith method
SubtitleStyleConfig
copyWith({
- TextStyle? textStyle,
- EdgeInsets? padding,
- EdgeInsets? margin,
- BoxDecoration? decoration,
- double? maxWidth,
- int? maxLines,
- 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,
);
}