copyWith method

ChatActiveStories copyWith({
  1. int? chatId,
  2. StoryList? list()?,
  3. int? order,
  4. bool? canBeArchived,
  5. int? maxReadStoryId,
  6. List<StoryInfo>? stories,
  7. dynamic extra,
  8. int? clientId,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

ChatActiveStories copyWith({
  int? chatId,
  StoryList? Function()? list,
  int? order,
  bool? canBeArchived,
  int? maxReadStoryId,
  List<StoryInfo>? stories,
  dynamic extra,
  int? clientId,
}) => ChatActiveStories(
  chatId: chatId ?? this.chatId,
  list: list != null ? list() : this.list,
  order: order ?? this.order,
  canBeArchived: canBeArchived ?? this.canBeArchived,
  maxReadStoryId: maxReadStoryId ?? this.maxReadStoryId,
  stories: stories ?? this.stories,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);