toOptionsJSON method

  1. @override
void toOptionsJSON(
  1. StringBuffer buffer
)
override

Implementation

@override
void toOptionsJSON(StringBuffer buffer) {
  super.toOptionsJSON(buffer);

  if (align != null) {
    buffer.writeAll(['"align":', jsonEncode(align), ','], '');
  }
  if (alignTo != null) {
    buffer.writeAll(['"alignTo":', jsonEncode(alignTo), ','], '');
  }
  if (allowOverlap != null) {
    buffer.writeAll(['"allowOverlap":', allowOverlap, ','], '');
  }
  if (animation != null) {
    buffer.writeAll(['"animation":', animation?.toJSON(), ','], '');
  }
  if (backgroundColor != null) {
    buffer.writeAll(
        ['"backgroundColor":', jsonEncode(backgroundColor), ','], '');
  }
  if (borderColor != null) {
    buffer.writeAll(['"borderColor":', jsonEncode(borderColor), ','], '');
  }
  if (borderRadius != null) {
    buffer.writeAll(['"borderRadius":', borderRadius, ','], '');
  }
  if (borderWidth != null) {
    buffer.writeAll(['"borderWidth":', borderWidth, ','], '');
  }
  if (className != null) {
    buffer.writeAll(['"className":', jsonEncode(className), ','], '');
  }
  if (color != null) {
    buffer.writeAll(['"color":', jsonEncode(color), ','], '');
  }
  if (crop != null) {
    buffer.writeAll(['"crop":', crop, ','], '');
  }
  if (defer != null) {
    buffer.writeAll(['"defer":', defer, ','], '');
  }
  if (enabled != null) {
    buffer.writeAll(['"enabled":', enabled, ','], '');
  }
  if (filter != null) {
    buffer.writeAll(['"filter":', filter?.toJSON(), ','], '');
  }
  if (format != null) {
    buffer.writeAll(['"format":', jsonEncode(format), ','], '');
  }
  if (formatter != null) {
    buffer.writeAll(['"formatter":', jsonEncode(formatter), ','], '');
  }
  if (inside != null) {
    buffer.writeAll(['"inside":', inside, ','], '');
  }
  if (nullFormat != null) {
    buffer.writeAll(['"nullFormat":', jsonEncode(nullFormat), ','], '');
  }
  if (nullFormatter != null) {
    buffer.writeAll(['"nullFormatter":', jsonEncode(nullFormatter), ','], '');
  }
  if (overflow != null) {
    buffer.writeAll(['"overflow":', jsonEncode(overflow), ','], '');
  }
  if (padding != null) {
    buffer.writeAll(['"padding":', padding, ','], '');
  }
  if (position != null) {
    buffer.writeAll(['"position":', jsonEncode(position), ','], '');
  }
  if (rotation != null) {
    buffer.writeAll(['"rotation":', rotation, ','], '');
  }
  if (shadow != null) {
    buffer.write('"shadow":{');
    for (var item in shadow!.entries) {
      buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
    }
    buffer.write('},');
  }
  if (shape != null) {
    buffer.writeAll(['"shape":', jsonEncode(shape), ','], '');
  }
  if (style != null) {
    buffer.write('"style":{');
    for (var item in style!.entries) {
      buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
    }
    buffer.write('},');
  }
  if (textPath != null) {
    buffer.writeAll(['"textPath":', textPath?.toJSON(), ','], '');
  }
  if (useHTML != null) {
    buffer.writeAll(['"useHTML":', useHTML, ','], '');
  }
  if (verticalAlign != null) {
    buffer.writeAll(['"verticalAlign":', jsonEncode(verticalAlign), ','], '');
  }
  if (x != null) {
    buffer.writeAll(['"x":', x, ','], '');
  }
  if (y != null) {
    buffer.writeAll(['"y":', y, ','], '');
  }
  if (zIndex != null) {
    buffer.writeAll(['"zIndex":', zIndex, ','], '');
  }
}