toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final name = this.name;
  final targetId = this.targetId;
  final targetType = this.targetType;
  final value = this.value;
  return {
    'name': name,
    if (targetId != null) 'targetId': targetId,
    if (targetType != null) 'targetType': targetType.toValue(),
    if (value != null) 'value': value,
  };
}