copyWith method

DanmuModel copyWith({
  1. int? id,
  2. String? text,
  3. Duration? startTime,
  4. double? specifyY,
  5. List<InlineSpan>? spans,
  6. bool? isClickable,
  7. ImageProvider<Object>? imageProvider,
  8. String? package,
  9. bool? isRepeatable,
  10. double? opacity,
  11. EdgeInsets? padding,
  12. EdgeInsets? margin,
  13. double? strokeWidth,
  14. Size? imageSize,
  15. int? flag,
  16. BoxDecoration? decoration,
  17. BoxDecoration? foregroundDecoration,
  18. AlignmentGeometry? alignment,
  19. Duration? insertTime,
  20. 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,
  );
}