copyWith method

ForumTopicInfo copyWith({
  1. int? chatId,
  2. int? forumTopicId,
  3. String? name,
  4. ForumTopicIcon? icon,
  5. int? creationDate,
  6. MessageSender? creatorId,
  7. bool? isGeneral,
  8. bool? isOutgoing,
  9. bool? isClosed,
  10. bool? isHidden,
  11. bool? isNameImplicit,
  12. dynamic extra,
  13. 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

ForumTopicInfo copyWith({
  int? chatId,
  int? forumTopicId,
  String? name,
  ForumTopicIcon? icon,
  int? creationDate,
  MessageSender? creatorId,
  bool? isGeneral,
  bool? isOutgoing,
  bool? isClosed,
  bool? isHidden,
  bool? isNameImplicit,
  dynamic extra,
  int? clientId,
}) => ForumTopicInfo(
  chatId: chatId ?? this.chatId,
  forumTopicId: forumTopicId ?? this.forumTopicId,
  name: name ?? this.name,
  icon: icon ?? this.icon,
  creationDate: creationDate ?? this.creationDate,
  creatorId: creatorId ?? this.creatorId,
  isGeneral: isGeneral ?? this.isGeneral,
  isOutgoing: isOutgoing ?? this.isOutgoing,
  isClosed: isClosed ?? this.isClosed,
  isHidden: isHidden ?? this.isHidden,
  isNameImplicit: isNameImplicit ?? this.isNameImplicit,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);