toMap method

  1. @override
Map<String, Object> toMap ()
override

model -> map

Implementation

@override
Map<String, Object> toMap() {
  return {
    'id': this.getId(),
    'text': this.text,
    'position': this.position?.toMap(),
    "bgColor": this.bgColor?.value?.toRadixString(16),
    "fontColor": this.fontColor?.value?.toRadixString(16),
    "fontSize": this.fontSize,
    "typeFace": this.typeFace?.toMap(),
    "alignX": this.alignX,
    "alignY": this.alignY,
    "rotate": this.rotate,
    "zIndex": this.zIndex,
    'visible': this.visible,
  };
}