toOptionsJSON method

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

Implementation

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

  if (backgroundColor != null) {
    buffer.writeAll(
        ['"backgroundColor":', jsonEncode(backgroundColor), ','], '');
  }
  if (borderColor != null) {
    buffer.writeAll(['"borderColor":', jsonEncode(borderColor), ','], '');
  }
  if (borderRadius != null) {
    buffer.writeAll(['"borderRadius":', jsonEncode(borderRadius), ','], '');
  }
  if (borderWidth != null) {
    buffer.writeAll(['"borderWidth":', borderWidth, ','], '');
  }
  if (className != null) {
    buffer.writeAll(['"className":', jsonEncode(className), ','], '');
  }
  if (innerRadius != null) {
    buffer.writeAll(['"innerRadius":', jsonEncode(innerRadius), ','], '');
  }
  if (outerRadius != null) {
    buffer.writeAll(['"outerRadius":', jsonEncode(outerRadius), ','], '');
  }
  if (shape != null) {
    buffer.writeAll(['"shape":', jsonEncode(shape), ','], '');
  }
}