toJson method
Implementation
Map<String, Object?> toJson() => <String, Object?>{
'transferId': transferId,
'direction': direction.wireValue,
'status': status.wireValue,
'bytesTransferred': bytesTransferred,
if (totalBytes != null) 'totalBytes': totalBytes,
if (fraction != null) 'progress': fraction,
if (fileName != null) 'fileName': fileName,
};