copyWith method

AnkiMapping copyWith(
  1. {String? label,
  2. String? model,
  3. List<String?>? exportFieldKeys,
  4. List<String>? creatorFieldKeys,
  5. List<String>? creatorCollapsedFieldKeys,
  6. List<String>? tags,
  7. int? order,
  8. int? id,
  9. Map<String, Map<int, String>>? enhancements,
  10. Map<int, String>? actions,
  11. bool? exportMediaTags,
  12. bool? useBrTags,
  13. bool? prependDictionaryNames}
)

Creates a deep copy of this mapping but with the given variables replaced with the new values.

Implementation

AnkiMapping copyWith({
  String? label,
  String? model,
  List<String?>? exportFieldKeys,
  List<String>? creatorFieldKeys,
  List<String>? creatorCollapsedFieldKeys,
  List<String>? tags,
  int? order,
  int? id,
  Map<String, Map<int, String>>? enhancements,
  Map<int, String>? actions,
  bool? exportMediaTags,
  bool? useBrTags,
  bool? prependDictionaryNames,
}) {
  return AnkiMapping(
    label: label ?? this.label,
    model: model ?? this.model,
    exportFieldKeys: exportFieldKeys ?? this.exportFieldKeys,
    creatorFieldKeys: creatorFieldKeys ?? this.creatorFieldKeys,
    creatorCollapsedFieldKeys:
        creatorCollapsedFieldKeys ?? this.creatorCollapsedFieldKeys,
    tags: tags ?? this.tags,
    order: order ?? this.order,
    id: id ?? this.id,
    enhancements: enhancements ?? this.enhancements,
    actions: actions ?? this.actions,
    exportMediaTags: exportMediaTags ?? this.exportMediaTags,
    useBrTags: useBrTags ?? this.useBrTags,
    prependDictionaryNames:
        prependDictionaryNames ?? this.prependDictionaryNames,
  );
}