toOptionsJSON method

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

Implementation

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

  if (height != null) {
    buffer.writeAll(['"height":', height, ','], '');
  }
  if (type != null) {
    buffer.writeAll(['"type":', jsonEncode(type), ','], '');
  }
  if (width != null) {
    buffer.writeAll(['"width":', width, ','], '');
  }
  if (x != null) {
    buffer.writeAll(['"x":', x, ','], '');
  }
  if (y != null) {
    buffer.writeAll(['"y":', y, ','], '');
  }
}