PdfElement.table constructor

const PdfElement.table({
  1. String? visibleIfKey,
  2. required String dataSourceKey,
  3. required Map<String, String> columns,
  4. @Default.new(PdfTableBorderStyle.full) PdfTableBorderStyle borderStyle,
})

A table element that displays a dynamic list of data.

Implementation

const factory PdfElement.table({
  /// Optional key to control visibility.
  String? visibleIfKey,

  /// Key for the list of objects in the data map to be used as the data source.
  required String dataSourceKey,

  /// Mapping of data keys to column headers (Header -> DataKey).
  required Map<String, String> columns,

  /// Style of borders for the table.
  @Default(PdfTableBorderStyle.full) PdfTableBorderStyle borderStyle,
}) = PdfTableElement;