isPrivateChat property

bool get isPrivateChat

Checks if the current update is from a private chat.

Returns true if the chat type is private, false otherwise. The result is cached after the first access for better performance.

Implementation

bool get isPrivateChat {
  if (!_isPrivateChatCached) {
    _cachedIsPrivateChat = chat?.type == ChatType.private;
    _isPrivateChatCached = true;
  }
  return _cachedIsPrivateChat ?? false;
}