copyWith method

  1. @override
KeyboardButtonTypeRequestChat copyWith({
  1. int? id,
  2. bool? chatIsChannel,
  3. bool? restrictChatIsForum,
  4. bool? chatIsForum,
  5. bool? restrictChatHasUsername,
  6. bool? chatHasUsername,
  7. bool? chatIsCreated,
  8. ChatAdministratorRights? userAdministratorRights()?,
  9. ChatAdministratorRights? botAdministratorRights()?,
  10. bool? botIsMember,
  11. bool? requestTitle,
  12. bool? requestUsername,
  13. bool? requestPhoto,
})
override

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

Implementation

@override
KeyboardButtonTypeRequestChat copyWith({
  int? id,
  bool? chatIsChannel,
  bool? restrictChatIsForum,
  bool? chatIsForum,
  bool? restrictChatHasUsername,
  bool? chatHasUsername,
  bool? chatIsCreated,
  ChatAdministratorRights? Function()? userAdministratorRights,
  ChatAdministratorRights? Function()? botAdministratorRights,
  bool? botIsMember,
  bool? requestTitle,
  bool? requestUsername,
  bool? requestPhoto,
}) => KeyboardButtonTypeRequestChat(
  id: id ?? this.id,
  chatIsChannel: chatIsChannel ?? this.chatIsChannel,
  restrictChatIsForum: restrictChatIsForum ?? this.restrictChatIsForum,
  chatIsForum: chatIsForum ?? this.chatIsForum,
  restrictChatHasUsername:
      restrictChatHasUsername ?? this.restrictChatHasUsername,
  chatHasUsername: chatHasUsername ?? this.chatHasUsername,
  chatIsCreated: chatIsCreated ?? this.chatIsCreated,
  userAdministratorRights: userAdministratorRights != null
      ? userAdministratorRights()
      : this.userAdministratorRights,
  botAdministratorRights: botAdministratorRights != null
      ? botAdministratorRights()
      : this.botAdministratorRights,
  botIsMember: botIsMember ?? this.botIsMember,
  requestTitle: requestTitle ?? this.requestTitle,
  requestUsername: requestUsername ?? this.requestUsername,
  requestPhoto: requestPhoto ?? this.requestPhoto,
);