toOptionsJSON method

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

Implementation

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

  if (allButtonsEnabled != null) {
    buffer.writeAll(['"allButtonsEnabled":', allButtonsEnabled, ','], '');
  }
  if (buttonPosition != null) {
    buffer.writeAll(['"buttonPosition":', buttonPosition?.toJSON(), ','], '');
  }
  if (buttonSpacing != null) {
    buffer.writeAll(['"buttonSpacing":', buttonSpacing, ','], '');
  }
  if (buttonTheme != null) {
    buffer.writeAll(['"buttonTheme":', jsonEncode(buttonTheme), ','], '');
  }
  if (buttons != null) {
    buffer.write('"buttons":[');
    for (var item in buttons!) {
      buffer.writeAll([item.toJSON(), ','], '');
    }
    buffer.write('],');
  }
  if (dropdown != null) {
    buffer.writeAll(['"dropdown":', jsonEncode(dropdown), ','], '');
  }
  if (enabled != null) {
    buffer.writeAll(['"enabled":', enabled, ','], '');
  }
  if (floating != null) {
    buffer.writeAll(['"floating":', floating, ','], '');
  }
  if (height != null) {
    buffer.writeAll(['"height":', height, ','], '');
  }
  if (inputBoxBorderColor != null) {
    buffer.writeAll(
        ['"inputBoxBorderColor":', jsonEncode(inputBoxBorderColor), ','], '');
  }
  if (inputBoxHeight != null) {
    buffer.writeAll(['"inputBoxHeight":', inputBoxHeight, ','], '');
  }
  if (inputBoxWidth != null) {
    buffer.writeAll(['"inputBoxWidth":', inputBoxWidth, ','], '');
  }
  if (inputDateFormat != null) {
    buffer.writeAll(
        ['"inputDateFormat":', jsonEncode(inputDateFormat), ','], '');
  }
  if (inputDateParser != null) {
    buffer
        .writeAll(['"inputDateParser":', inputDateParser?.toJSON(), ','], '');
  }
  if (inputEditDateFormat != null) {
    buffer.writeAll(
        ['"inputEditDateFormat":', jsonEncode(inputEditDateFormat), ','], '');
  }
  if (inputEnabled != null) {
    buffer.writeAll(['"inputEnabled":', inputEnabled, ','], '');
  }
  if (inputPosition != null) {
    buffer.writeAll(['"inputPosition":', inputPosition?.toJSON(), ','], '');
  }
  if (inputSpacing != null) {
    buffer.writeAll(['"inputSpacing":', inputSpacing, ','], '');
  }
  if (inputStyle != null) {
    buffer.write('"inputStyle":{');
    for (var item in inputStyle!.entries) {
      buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
    }
    buffer.write('},');
  }
  if (labelStyle != null) {
    buffer.write('"labelStyle":{');
    for (var item in labelStyle!.entries) {
      buffer.writeAll(['"', item.key, '":', jsonEncode(item.value), ','], '');
    }
    buffer.write('},');
  }
  if (selected != null) {
    buffer.writeAll(['"selected":', selected, ','], '');
  }
  if (verticalAlign != null) {
    buffer.writeAll(['"verticalAlign":', jsonEncode(verticalAlign), ','], '');
  }
  if (x != null) {
    buffer.writeAll(['"x":', x, ','], '');
  }
  if (y != null) {
    buffer.writeAll(['"y":', y, ','], '');
  }
}