copyWith method

ParagraphStyle copyWith({
  1. String? name,
  2. String? displayName,
  3. String? fontFamily,
  4. double? fontSize,
  5. List<String>? styles,
  6. String? color,
  7. String? highlightColor,
  8. String? textAlign,
  9. double? lineHeight,
  10. double? spacingBefore,
  11. double? spacingAfter,
  12. int? indent,
})

Creates a copy with some fields modified

Implementation

ParagraphStyle copyWith({
  String? name,
  String? displayName,
  String? fontFamily,
  double? fontSize,
  List<String>? styles,
  String? color,
  String? highlightColor,
  String? textAlign,
  double? lineHeight,
  double? spacingBefore,
  double? spacingAfter,
  int? indent,
}) {
  return ParagraphStyle(
    name: name ?? this.name,
    displayName: displayName ?? this.displayName,
    fontFamily: fontFamily ?? this.fontFamily,
    fontSize: fontSize ?? this.fontSize,
    styles: styles ?? this.styles,
    color: color ?? this.color,
    highlightColor: highlightColor ?? this.highlightColor,
    textAlign: textAlign ?? this.textAlign,
    lineHeight: lineHeight ?? this.lineHeight,
    spacingBefore: spacingBefore ?? this.spacingBefore,
    spacingAfter: spacingAfter ?? this.spacingAfter,
    indent: indent ?? this.indent,
  );
}