toOptionsJSON method

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

Implementation

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

  if (color != null) {
    buffer.writeAll(['"color":', jsonEncode(color), ','], '');
  }
  if (dashStyle != null) {
    buffer.writeAll(['"dashStyle":', jsonEncode(dashStyle), ','], '');
  }
  if (opacity != null) {
    buffer.writeAll(['"opacity":', opacity, ','], '');
  }
  if (width != null) {
    buffer.writeAll(['"width":', width, ','], '');
  }
}