Map<String, dynamic> toMap() { return { "type": type?.toValue(), "lengthComputable": lengthComputable, "loaded": loaded, "total": total, }; }