Map<String, dynamic> toJson() { return { 'type': type, 'lineStyle': lineStyle?.toJson(), 'shadowStyle': shadowStyle?.toJson(), }; }