toMap method
转换为Map
Implementation
Map<String, dynamic> toMap() {
return {
'id': id,
'fileInfo': fileInfo?.toMap(),
'name': name,
'path': path,
'source': source.index,
'status': status?.index,
'progress': progress,
'fileSize': fileSize,
'fileSizeInfo': fileSizeInfo,
'url': url,
'createTime': createTime?.toIso8601String(),
'updateTime': updateTime?.toIso8601String(),
};
}