CollectiveFile.fromJSON constructor
CollectiveFile.fromJSON(
- Map<String, dynamic> data
)
Implementation
factory CollectiveFile.fromJSON(Map<String, dynamic> data) => CollectiveFile(
id: data['id'] ?? '',
collectiveId: data['collectiveId'] ?? '',
name: data['name'] ?? '',
description: data['description'] ?? '',
url: data['url'] ?? '',
thumbnailUrl: data['thumbnailUrl'] ?? '',
fileType: data['fileType'] ?? 'other',
fileSize: data['fileSize'] ?? 0,
uploadedBy: data['uploadedBy'] ?? '',
uploaderName: data['uploaderName'] ?? '',
uploaderImgUrl: data['uploaderImgUrl'] ?? '',
folder: data['folder'] ?? '',
createdAt: data['createdAt'] ?? 0,
);