copyWith method

NmResponseRule copyWith({
  1. String? id,
  2. String? name,
  3. bool? enabled,
  4. int? priority,
  5. NmResponseChannel? channel,
  6. NmResponseMatcher? matcher,
  7. List<NmResponseEffect>? effects,
  8. NmSemanticOutcome? outcome,
  9. bool clearOutcome = false,
})

Copy with.

Implementation

NmResponseRule copyWith({
  String? id,
  String? name,
  bool? enabled,
  int? priority,
  NmResponseChannel? channel,
  NmResponseMatcher? matcher,
  List<NmResponseEffect>? effects,
  NmSemanticOutcome? outcome,
  bool clearOutcome = false,
}) => NmResponseRule(
  id: id ?? this.id,
  name: name ?? this.name,
  enabled: enabled ?? this.enabled,
  priority: priority ?? this.priority,
  channel: channel ?? this.channel,
  matcher: matcher ?? this.matcher,
  effects: effects ?? this.effects,
  outcome: clearOutcome ? null : outcome ?? this.outcome,
);