ReportTemplate constructor
ReportTemplate({
- required String id,
- required String name,
- String? description,
- ReportType reportType = ReportType.label,
- double pageWidth = 210,
- double pageHeight = 297,
- PageFormat pageFormat = PageFormat.a4Portrait,
- double marginTop = 10,
- double marginBottom = 10,
- double marginLeft = 10,
- double marginRight = 10,
- int itemsPerRow = 4,
- int itemsPerColumn = 6,
- double horizontalGap = 2,
- double verticalGap = 2,
- double itemWidth = 40,
- double itemHeight = 45,
- List<
ReportElement> ? elements, - String? dataSchemaName,
- DataSchema? dataSchema,
- DateTime? createdAt,
- DateTime? updatedAt,
Implementation
ReportTemplate({
required this.id,
required this.name,
this.description,
this.reportType = ReportType.label,
this.pageWidth = 210,
this.pageHeight = 297,
this.pageFormat = PageFormat.a4Portrait,
this.marginTop = 10,
this.marginBottom = 10,
this.marginLeft = 10,
this.marginRight = 10,
this.itemsPerRow = 4,
this.itemsPerColumn = 6,
this.horizontalGap = 2,
this.verticalGap = 2,
this.itemWidth = 40, // Portrait: smaller width
this.itemHeight = 45, // Portrait: larger height
List<ReportElement>? elements,
this.dataSchemaName,
this.dataSchema,
DateTime? createdAt,
DateTime? updatedAt,
}) : elements = elements ?? [],
createdAt = createdAt ?? DateTime.now(),
updatedAt = updatedAt ?? DateTime.now();