toJson method

Map<String, Object> toJson()

Implementation

Map<String, Object> toJson() {
  return <String, Object>{
    'text': text,
    'fontName': fontName,
    'x': offset.dx.toInt(),
    'y': offset.dy.toInt(),
    'size': fontSizePx,
    'r': textColor.red,
    'g': textColor.green,
    'b': textColor.blue,
    'a': textColor.alpha,
    'textAlign': _alignValue,
  };
}