copyWith method

ChatActiveStories copyWith({
  1. int? chatId,
  2. StoryList? list()?,
  3. int? order,
  4. int? maxReadStoryId,
  5. List<StoryInfo>? stories,
  6. dynamic extra,
  7. 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,
  int? maxReadStoryId,
  List<StoryInfo>? stories,
  dynamic extra,
  int? clientId,
}) =>
    ChatActiveStories(
      chatId: chatId ?? this.chatId,
      list: list != null ? list() : this.list,
      order: order ?? this.order,
      maxReadStoryId: maxReadStoryId ?? this.maxReadStoryId,
      stories: stories ?? this.stories,
      extra: extra ?? this.extra,
      clientId: clientId ?? this.clientId,
    );