createFolderResultDataFromJson function
Implementation
createFolderResultDataFromJson(CreateFolderResultData data, Map<String, dynamic> json) {
if (json['fileName'] != null) {
data.fileName = json['fileName'].toString();
}
if (json['fileSize'] != null) {
data.fileSize = json['fileSize'] is String
? int.tryParse(json['fileSize'])
: json['fileSize'].toInt();
}
if (json['fileType'] != null) {
data.fileType = json['fileType'].toString();
}
if (json['ownerID'] != null) {
data.ownerID = json['ownerID'].toString();
}
if (json['isDir'] != null) {
data.isDir = json['isDir'] is String
? int.tryParse(json['isDir'])
: json['isDir'].toInt();
}
if (json['parentID'] != null) {
data.parentID = json['parentID'] is String
? int.tryParse(json['parentID'])
: json['parentID'].toInt();
}
if (json['id'] != null) {
data.id = json['id'] is String
? int.tryParse(json['id'])
: json['id'].toInt();
}
if (json['updated'] != null) {
data.updated = json['updated'] is String
? int.tryParse(json['updated'])
: json['updated'].toInt();
}
if (json['created'] != null) {
data.created = json['created'] is String
? int.tryParse(json['created'])
: json['created'].toInt();
}
return data;
}