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 (fontSize != null) {
    buffer.writeAll(['"fontSize":', jsonEncode(fontSize), ','], '');
  }
  if (fontWeight != null) {
    buffer.writeAll(['"fontWeight":', jsonEncode(fontWeight), ','], '');
  }
  if (textOutline != null) {
    buffer.writeAll(['"textOutline":', jsonEncode(textOutline), ','], '');
  }
}