copyWith method

ChatInviteLinkInfo copyWith({
  1. int? chatId,
  2. int? accessibleFor,
  3. InviteLinkChatType? type,
  4. String? title,
  5. ChatPhotoInfo? photo()?,
  6. int? accentColorId,
  7. String? description,
  8. int? memberCount,
  9. List<int>? memberUserIds,
  10. bool? createsJoinRequest,
  11. bool? isPublic,
  12. bool? isVerified,
  13. bool? isScam,
  14. bool? isFake,
  15. dynamic extra,
  16. 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

ChatInviteLinkInfo copyWith({
  int? chatId,
  int? accessibleFor,
  InviteLinkChatType? type,
  String? title,
  ChatPhotoInfo? Function()? photo,
  int? accentColorId,
  String? description,
  int? memberCount,
  List<int>? memberUserIds,
  bool? createsJoinRequest,
  bool? isPublic,
  bool? isVerified,
  bool? isScam,
  bool? isFake,
  dynamic extra,
  int? clientId,
}) =>
    ChatInviteLinkInfo(
      chatId: chatId ?? this.chatId,
      accessibleFor: accessibleFor ?? this.accessibleFor,
      type: type ?? this.type,
      title: title ?? this.title,
      photo: photo != null ? photo() : this.photo,
      accentColorId: accentColorId ?? this.accentColorId,
      description: description ?? this.description,
      memberCount: memberCount ?? this.memberCount,
      memberUserIds: memberUserIds ?? this.memberUserIds,
      createsJoinRequest: createsJoinRequest ?? this.createsJoinRequest,
      isPublic: isPublic ?? this.isPublic,
      isVerified: isVerified ?? this.isVerified,
      isScam: isScam ?? this.isScam,
      isFake: isFake ?? this.isFake,
      extra: extra ?? this.extra,
      clientId: clientId ?? this.clientId,
    );