toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final enabled = this.enabled;
  final types = this.types;
  return {
    if (enabled != null) 'enabled': enabled,
    if (types != null) 'types': types.map((e) => e.toValue()).toList(),
  };
}