isGroupChat property

bool get isGroupChat

Checks if the current update is from a group chat.

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

Implementation

bool get isGroupChat {
  if (!_isGroupChatCached) {
    final chatType = chat?.type;
    _cachedIsGroupChat =
        chatType == ChatType.group || chatType == ChatType.supergroup;
    _isGroupChatCached = true;
  }
  return _cachedIsGroupChat ?? false;
}