fromJson static method

CommunityChat? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static CommunityChat? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return CommunityChat(
    chatId: (json['chat_id'] as int?) ?? 0,
    canViewHistory: (json['can_view_history'] as bool?) ?? false,
    isHidden: (json['is_hidden'] as bool?) ?? false,
  );
}