copyWith method

LeidingNode copyWith({
  1. String? naam,
  2. String? parentId,
  3. bool clearParent = false,
  4. Invoer? invoer,
  5. Resultaten? resultaten,
  6. bool clearResultaten = false,
})

Implementation

LeidingNode copyWith({
  String? naam,
  String? parentId,
  bool clearParent = false,
  Invoer? invoer,
  Resultaten? resultaten,
  bool clearResultaten = false,
}) =>
    LeidingNode(
      id: id,
      naam: naam ?? this.naam,
      parentId: clearParent ? null : (parentId ?? this.parentId),
      invoer: invoer ?? this.invoer,
      resultaten: clearResultaten ? null : (resultaten ?? this.resultaten),
    );