toJson method
Implementation
@override
Map<String, dynamic> toJson() {
return {
if (position != null)
'position': kIsWeb ? position!.value : jsonEncode(position!.value),
if (style != null)
'style': kIsWeb ? style!.value : jsonEncode(style!.value),
if (legendDisabled != null)
'legendDisabled': kIsWeb ? legendDisabled : jsonEncode(legendDisabled),
};
}