fromJson static method

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

Implementation

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

  return ChatFolderInfo(
    id: (json['id'] as int?) ?? 0,
    name: ChatFolderName.fromJson(tdMapFromJson(json['name'])),
    icon: ChatFolderIcon.fromJson(tdMapFromJson(json['icon'])),
    colorId: (json['color_id'] as int?) ?? 0,
    isShareable: (json['is_shareable'] as bool?) ?? false,
    hasMyInviteLinks: (json['has_my_invite_links'] as bool?) ?? false,
  );
}