-
-
Save sbis04/19c576905f9d977e6cb3f73867ec430d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AssetData { | |
AssetData({ | |
this.data, | |
}); | |
List<Data> data; | |
factory AssetData.fromRawJson(String str) => | |
AssetData.fromJson(json.decode(str)); | |
String toRawJson() => json.encode(toJson()); | |
factory AssetData.fromJson(Map<String, dynamic> json) => AssetData( | |
data: json["data"] == null | |
? null | |
: List<Data>.from(json["data"].map((x) => Data.fromJson(x))), | |
); | |
Map<String, dynamic> toJson() => { | |
"data": data == null | |
? null | |
: List<dynamic>.from(data.map((x) => x.toJson())), | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment