toJson method
Implementation
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (hidden != null) map['hidden'] = hidden;
if (preset != null) map['preset'] = preset!.name;
if (connectionStyle != null) map['connectionStyle'] = connectionStyle!.name;
if (jointShape != null) map['jointShape'] = jointShape!.name;
if (dotsOpacity != null) map['dotsOpacity'] = dotsOpacity;
if (connectionsOpacity != null) map['connectionsOpacity'] = connectionsOpacity;
if (dotsInnerColor != null) map['dotsInnerColor'] = dotsInnerColor!.index;
if (dotsOuterColor != null) map['dotsOuterColor'] = dotsOuterColor!.index;
if (connectionsInnerColor != null) map['connectionsInnerColor'] = connectionsInnerColor!.index;
if (connectionsOuterColor != null) map['connectionsOuterColor'] = connectionsOuterColor!.index;
if (dotsGlow != null) map['dotsGlow'] = dotsGlow;
if (connectionsGlow != null) map['connectionsGlow'] = connectionsGlow;
if (lineWidthScale != null) map['lineWidthScale'] = lineWidthScale;
if (outlineScale != null) map['outlineScale'] = outlineScale;
if (softness != null) map['softness'] = softness;
if (animationDuration != null) map['animationDuration'] = animationDuration;
return map;
}