Map<String, dynamic> toMap() { return { "total": total, "topics": topics.map((p) => p.toMap()).toList(), }; }