copyWith method

SubscriptionFilter copyWith({
  1. bool? promptsListChanged,
  2. List<String>? resourceSubscriptions,
  3. bool? resourcesListChanged,
  4. bool? toolsListChanged,
})

A copy with the given properties replaced; everything else, unknown keys included, is kept.

Implementation

SubscriptionFilter copyWith({
  bool? promptsListChanged,
  List<String>? resourceSubscriptions,
  bool? resourcesListChanged,
  bool? toolsListChanged,
}) =>
    SubscriptionFilter.fromJson({
      ...toJson(),
      if (promptsListChanged != null) 'promptsListChanged': $encode(promptsListChanged),
      if (resourceSubscriptions != null) 'resourceSubscriptions': $encode(resourceSubscriptions),
      if (resourcesListChanged != null) 'resourcesListChanged': $encode(resourcesListChanged),
      if (toolsListChanged != null) 'toolsListChanged': $encode(toolsListChanged),
    });