toJson method
Implementation
@override
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
void addIfPresent(String fieldName, dynamic value) {
if (value != null) {
json[fieldName] = value;
}
}
addIfPresent(
'hillshade-illumination-direction', hillshadeIlluminationDirection);
addIfPresent('hillshade-illumination-anchor', hillshadeIlluminationAnchor);
addIfPresent('hillshade-exaggeration', hillshadeExaggeration);
addIfPresent('hillshade-shadow-color', hillshadeShadowColor);
addIfPresent('hillshade-highlight-color', hillshadeHighlightColor);
addIfPresent('hillshade-accent-color', hillshadeAccentColor);
addIfPresent('visibility', visibility);
return json;
}