toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final name = this.name;
  final path = this.path;
  final state = this.state;
  final type = this.type;
  return {
    'Name': name,
    if (path != null) 'Path': path,
    if (state != null) 'State': state.toValue(),
    if (type != null) 'Type': type.toValue(),
  };
}