copyWith method

LineMetrics copyWith({
  1. LyricLine? line,
  2. double? height,
  3. double? width,
  4. double? activeWidth,
  5. double? activeHeight,
  6. double? translationWidth,
  7. double? translationHeight,
  8. List<LineMetrics>? activeMetrics,
  9. List<LineMetrics>? metrics,
  10. TextPainter? textPainter,
  11. TextPainter? activeTextPainter,
  12. TextPainter? translationTextPainter,
  13. List<WordMetrics>? words,
})

Implementation

LineMetrics copyWith({
  LyricLine? line,
  double? height,
  double? width,
  double? activeWidth,
  double? activeHeight,
  double? translationWidth,
  double? translationHeight,
  List<ui.LineMetrics>? activeMetrics,
  List<ui.LineMetrics>? metrics,
  TextPainter? textPainter,
  TextPainter? activeTextPainter,
  TextPainter? translationTextPainter,
  List<WordMetrics>? words,
}) {
  return LineMetrics(
    line: line ?? this.line,
    height: height ?? this.height,
    width: width ?? this.width,
    activeWidth: activeWidth ?? this.activeWidth,
    activeHeight: activeHeight ?? this.activeHeight,
    translationWidth: translationWidth ?? this.translationWidth,
    translationHeight: translationHeight ?? this.translationHeight,
    activeMetrics: activeMetrics ?? this.activeMetrics,
    metrics: metrics ?? this.metrics,
    textPainter: textPainter ?? this.textPainter,
    activeTextPainter: activeTextPainter ?? this.activeTextPainter,
    translationTextPainter:
        translationTextPainter ?? this.translationTextPainter,
    words: words ?? this.words,
  );
}