toJson method

Map<String, dynamic> toJson()

Implementation

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