toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final filePath = this.filePath;
  final fileContent = this.fileContent;
  final fileMode = this.fileMode;
  final sourceFile = this.sourceFile;
  return {
    'filePath': filePath,
    if (fileContent != null) 'fileContent': base64Encode(fileContent),
    if (fileMode != null) 'fileMode': fileMode.toValue(),
    if (sourceFile != null) 'sourceFile': sourceFile,
  };
}