copyWith method

Score copyWith({
  1. String? title,
  2. String? subtitle,
  3. String? composer,
  4. String? arranger,
  5. String? copyright,
  6. List<StaffGroup>? staffGroups,
  7. Map<String, dynamic>? metadata,
  8. PageLayout? pageLayout,
  9. MeiHeader? meiHeader,
  10. ScoreDefinition? scoreDefinition,
})

Create a copy with modified fields

Implementation

Score copyWith({
  String? title,
  String? subtitle,
  String? composer,
  String? arranger,
  String? copyright,
  List<StaffGroup>? staffGroups,
  Map<String, dynamic>? metadata,
  PageLayout? pageLayout,
  MeiHeader? meiHeader,
  ScoreDefinition? scoreDefinition,
}) {
  return Score(
    title: title ?? this.title,
    subtitle: subtitle ?? this.subtitle,
    composer: composer ?? this.composer,
    arranger: arranger ?? this.arranger,
    copyright: copyright ?? this.copyright,
    staffGroups: staffGroups ?? this.staffGroups,
    metadata: metadata ?? this.metadata,
    pageLayout: pageLayout ?? this.pageLayout,
    meiHeader: meiHeader ?? this.meiHeader,
    scoreDefinition: scoreDefinition ?? this.scoreDefinition,
  );
}