toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'name': name,
    'description': description,
    'reportType': reportType.name,
    'pageWidth': pageWidth,
    'pageHeight': pageHeight,
    'pageFormat': pageFormat.name,
    'marginTop': marginTop,
    'marginBottom': marginBottom,
    'marginLeft': marginLeft,
    'marginRight': marginRight,
    'itemsPerRow': itemsPerRow,
    'itemsPerColumn': itemsPerColumn,
    'horizontalGap': horizontalGap,
    'verticalGap': verticalGap,
    'itemWidth': itemWidth,
    'itemHeight': itemHeight,
    'elements': elements.map((e) => e.toJson()).toList(),
    'dataSchemaName': dataSchemaName,
    'dataSchema': dataSchema?.toJson(),
    'createdAt': createdAt.toIso8601String(),
    'updatedAt': updatedAt.toIso8601String(),
  };
}