toJson method

Map<String, dynamic> toJson()

Implementation

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