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 (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 (crop != null) {
    buffer.writeAll(['"crop":', crop, ','], '');
  }
  if (enabled != null) {
    buffer.writeAll(['"enabled":', enabled, ','], '');
  }
  if (format != null) {
    buffer.writeAll(['"format":', jsonEncode(format), ','], '');
  }
  if (formatter != null) {
    buffer.writeAll(['"formatter":', formatter?.toJSON(), ','], '');
  }
  if (overflow != null) {
    buffer.writeAll(['"overflow":', jsonEncode(overflow), ','], '');
  }
  if (rotation != null) {
    buffer.writeAll(['"rotation":', rotation, ','], '');
  }
  if (style != null) {
    buffer.writeAll(['"style":', style?.toJSON(), ','], '');
  }
  if (textAlign != null) {
    buffer.writeAll(['"textAlign":', jsonEncode(textAlign), ','], '');
  }
  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, ','], '');
  }
}