Untitled
unknown
dart
3 years ago
921 B
3
Indexable
class ListModel { ListModel({ this.data, }); List<Hastag> data; factory ListModel.fromJson(Map<String, dynamic> json) => ListModel( data: json["data"] == null ? null : List<Hastag>.from(json["data"].map((x) => Hastag.fromJson(x))), ); Map<String, dynamic> toJson() => { "data": data == null ? null : List<dynamic>.from(data.map((x) => x.toJson())), }; } class Hastag { Hastag({this.hastag, this.jumlah}); int jumlah; String hastag; factory Hastag.fromJson(Map<String, dynamic> json) => Hastag( jumlah: json["firstid"] == null ? null : json["firstid"], hastag: json["lastid"] == null ? null : json["lastid"], ); Map<String, dynamic> toJson() => { "firstid": jumlah == null ? null : jumlah, "lastid": hastag == null ? null : hastag, }; }
Editor is loading...