toMap method
Implementation
Map<String, dynamic> toMap() {
return <String, dynamic>{
'positionDx': position.dx,
'positionDy': position.dy,
'size.width': size.width,
'size.height': size.height,
'text': text,
'textColor': textColor.value,
'fontFamily': fontFamily,
'textSize': textSize,
'textIsBold': textIsBold,
'id': id,
'kind': kind.index,
'handlers': handlers.map((x) => x.index).toList(),
'handlerSize': handlerSize,
'backgroundColor': backgroundColor.value,
'borderColor': borderColor.value,
'borderThickness': borderThickness,
'elevation': elevation,
'next': next.map((x) => x.toMap()).toList(),
};
}