copyWith method
DanmuModel
copyWith({
- int? id,
- String? text,
- Duration? startTime,
- double? specifyY,
- List<
InlineSpan> ? spans, - bool? isClickable,
- ImageProvider<
Object> ? imageProvider, - String? package,
- bool? isRepeatable,
- double? opacity,
- EdgeInsets? padding,
- EdgeInsets? margin,
- double? strokeWidth,
- Size? imageSize,
- int? flag,
- BoxDecoration? decoration,
- BoxDecoration? foregroundDecoration,
- AlignmentGeometry? alignment,
- Duration? insertTime,
- TextStyle? textStyle,
Implementation
DanmuModel copyWith({
int? id,
String? text,
Duration? startTime,
double? specifyY,
List<InlineSpan>? spans,
bool? isClickable,
ImageProvider? imageProvider,
String? package,
bool? isRepeatable,
double? opacity,
EdgeInsets? padding,
EdgeInsets? margin,
double? strokeWidth,
Size? imageSize,
int? flag,
BoxDecoration? decoration,
BoxDecoration? foregroundDecoration,
AlignmentGeometry? alignment,
Duration? insertTime,
TextStyle? textStyle,
}) {
return DanmuModel(
id: id ?? this.id,
text: text ?? this.text,
startTime: startTime ?? this.startTime,
specifyY: specifyY ?? this.specifyY,
spans: spans ?? this.spans,
isClickable: isClickable ?? this.isClickable,
imageProvider: imageProvider ?? this.imageProvider,
package: package ?? this.package,
isRepeatable: isRepeatable ?? this.isRepeatable,
opacity: opacity ?? this.opacity,
padding: padding ?? this.padding,
margin: margin ?? this.margin,
strokeWidth: strokeWidth ?? this.strokeWidth,
imageSize: imageSize ?? this.imageSize,
flag: flag ?? this.flag,
decoration: decoration ?? this.decoration,
foregroundDecoration: foregroundDecoration ?? this.foregroundDecoration,
alignment: alignment ?? this.alignment,
insertTime: insertTime ?? this.insertTime,
textStyle: textStyle ?? this.textStyle,
);
}