toJson method
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;
}