toJson method
Implementation
Object toJson() {
final Map<String, Object> json = <String, Object>{};
if (_location != null) {
json['location'] = _location!.toJson();
}
if (_radius != null) {
json['radius'] = _radius!;
}
if (_viewbox != null) {
json['viewbox'] = _viewbox!.toJson();
}
if (_path != null) {
json['path'] = locationsToJson(_path!);
}
if (_types != null) {
final types = <int>[];
for (final type in _types!) {
types.add(type.index);
}
json['types'] = types;
}
return json;
}