KonectarEvents/lib/model/topics_cloud_model.dart

81 lines
2.0 KiB
Dart

// To parse this JSON data, do
//
// final welcome = welcomeFromJson(jsonString);
import 'dart:convert';
TopicsCloudResp welcomeFromJson(String str) =>
TopicsCloudResp.fromJson(json.decode(str));
String welcomeToJson(TopicsCloudResp data) => json.encode(data.toJson());
class TopicsCloudResp {
List<Map<String, List<TopicsCloudData>>>? data;
TopicsCloudResp({
this.data,
});
factory TopicsCloudResp.fromJson(Map<String, dynamic> json) =>
TopicsCloudResp(
data: json["data"] == null
? []
: List<Map<String, List<TopicsCloudData>>>.from(json["data"]!.map(
(x) => Map.from(x).map((k, v) =>
MapEntry<String, List<TopicsCloudData>>(
k,
List<TopicsCloudData>.from(
v.map((x) => TopicsCloudData.fromJson(x))))))),
);
Map<String, dynamic> toJson() => {
"data": data == null
? []
: List<dynamic>.from(data!.map((x) => Map.from(x).map((k, v) =>
MapEntry<String, dynamic>(
k, List<dynamic>.from(v.map((x) => x.toJson())))))),
};
}
class Topicsresp {
List<TopicsCloudData> data;
Topicsresp({
required this.data,
});
factory Topicsresp.fromJson(Map<String, dynamic> json) => Topicsresp(
data: List<TopicsCloudData>.from(
json["data"].map((x) => TopicsCloudData.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"data": List<dynamic>.from(data.map((x) => x.toJson())),
};
}
class TopicsCloudData {
String? total;
String? topic;
String? id;
TopicsCloudData({
this.total,
this.topic,
this.id,
});
factory TopicsCloudData.fromJson(Map<String, dynamic> json) =>
TopicsCloudData(
total: json["total"],
topic: json["topic"],
id: json["id"],
);
Map<String, dynamic> toJson() => {
"total": total,
"topic": topic,
"id": id,
};
}