toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'viewId': viewId,
    'text': text,
    'textColor': textColor,
    'textSize': textSize,
    'backgroundColor': backgroundColor,
    'image': image,
    'offsetX': offsetX,
    'offsetY': offsetY,
    'width': width,
    'height': height,
    'enableTap': enableTap,
  }..removeWhere((key, value) => value == null);
}