class VersionDto { VersionDto({ required this.latestVersion, required this.updatedAt, required this.downloadUrl, required this.updateContent, required this.createdAt, required this.lowVersion, required this.id, required this.downloadSize, required this.platform, }); String latestVersion; DateTime updatedAt; String downloadUrl; List updateContent; DateTime createdAt; String lowVersion; int id; String downloadSize; int platform; factory VersionDto.fromJson(Map json) => VersionDto( latestVersion: json["latest_version"], updatedAt: DateTime.parse(json["updated_at"]), downloadUrl: json["download_url"], updateContent: List.from(json["update_content"].map((x) => x)), createdAt: DateTime.parse(json["created_at"]), lowVersion: json["low_version"], id: json["id"], downloadSize: json["download_size"], platform: json["platform"], ); Map toJson() => { "latest_version": latestVersion, "updated_at": updatedAt.toIso8601String(), "download_url": downloadUrl, "update_content": List.from(updateContent.map((x) => x)), "created_at": createdAt.toIso8601String(), "low_version": lowVersion, "id": id, "download_size": downloadSize, "platform": platform, }; }