copyWith method

NmFieldMapping copyWith({
  1. String? target,
  2. List<String>? aliases,
  3. int? position,
  4. bool clearPosition = false,
})

A copy with the given fields replaced; clearPosition removes the position.

Implementation

NmFieldMapping copyWith({String? target, List<String>? aliases, int? position, bool clearPosition = false}) => NmFieldMapping(
  source: source,
  target: target ?? this.target,
  aliases: aliases ?? this.aliases,
  position: clearPosition ? null : (position ?? this.position),
);