toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (direction != null) {
    json['direction'] = direction!.value;
  }
  if (speed != null) json['speed'] = speed;
  if (frequency != null) json['frequency'] = frequency;
  return json;
}