toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => <String, dynamic>{
  'transferId': transferId,
  'direction': direction.wireValue,
  'status': 'completed',
  'statusCode': statusCode,
  'bytesTransferred': bytesTransferred,
  if (fileName != null) 'fileName': fileName,
  if (mimeType != null) 'mimeType': mimeType,
  if (destination != null) 'destination': destination,
  if (data.isNotEmpty) 'data': data,
};