toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final alignment = this.alignment;
  final backgroundColor = this.backgroundColor;
  final backgroundOpacity = this.backgroundOpacity;
  final fontColor = this.fontColor;
  final fontOpacity = this.fontOpacity;
  final fontResolution = this.fontResolution;
  final fontScript = this.fontScript;
  final fontSize = this.fontSize;
  final outlineColor = this.outlineColor;
  final outlineSize = this.outlineSize;
  final shadowColor = this.shadowColor;
  final shadowOpacity = this.shadowOpacity;
  final shadowXOffset = this.shadowXOffset;
  final shadowYOffset = this.shadowYOffset;
  final teletextSpacing = this.teletextSpacing;
  final xPosition = this.xPosition;
  final yPosition = this.yPosition;
  return {
    if (alignment != null) 'alignment': alignment.toValue(),
    if (backgroundColor != null) 'backgroundColor': backgroundColor.toValue(),
    if (backgroundOpacity != null) 'backgroundOpacity': backgroundOpacity,
    if (fontColor != null) 'fontColor': fontColor.toValue(),
    if (fontOpacity != null) 'fontOpacity': fontOpacity,
    if (fontResolution != null) 'fontResolution': fontResolution,
    if (fontScript != null) 'fontScript': fontScript.toValue(),
    if (fontSize != null) 'fontSize': fontSize,
    if (outlineColor != null) 'outlineColor': outlineColor.toValue(),
    if (outlineSize != null) 'outlineSize': outlineSize,
    if (shadowColor != null) 'shadowColor': shadowColor.toValue(),
    if (shadowOpacity != null) 'shadowOpacity': shadowOpacity,
    if (shadowXOffset != null) 'shadowXOffset': shadowXOffset,
    if (shadowYOffset != null) 'shadowYOffset': shadowYOffset,
    if (teletextSpacing != null) 'teletextSpacing': teletextSpacing.toValue(),
    if (xPosition != null) 'xPosition': xPosition,
    if (yPosition != null) 'yPosition': yPosition,
  };
}