PdfGridHeaderCollection class Null safety

Provides customization of the settings for the header.

//Create a new PDF document
PdfDocument document = PdfDocument();
//Create a PdfGrid
PdfGrid grid = PdfGrid();
//Add columns to grid
grid.columns.add(count: 3);
//Add headers to grid
PdfGridHeaderCollection headers = grid.headers;
headers[0].cells[0].value = 'Employee ID';
headers[0].cells[1].value = 'Employee Name';
headers[0].cells[2].value = 'Salary';
//Add rows to grid
PdfGridRow row1 = grid.rows.add();
row1.cells[0].value = 'E01';
row1.cells[1].value = 'Clay';
row1.cells[2].value = '\$10,000';
PdfGridRow row2 = grid.rows.add();
row2.cells[0].value = 'E02';
row2.cells[1].value = 'Simon';
row2.cells[2].value = '\$12,000';
//Set the rows span
grid.rows.setSpan(0, 1, 2, 1);
//Draw the grid in PDF document page
    page: document.pages.add(), bounds: const Rect.fromLTWH(0, 0, 0, 0));
//Save the document.
List<int> bytes = document.save();
//Dispose the document.


PdfGridHeaderCollection(PdfGrid grid)
Initializes a new instance of the PdfGridHeaderCollection class with the parent grid.


count int
Gets the number of header in the PdfGrid. [...]
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


add(int count) List<PdfGridRow>
PdfGrid enables you to quickly and easily add rows to the header at run time. [...]
applyStyle(PdfGridStyleBase style) → void
Enables you to set the appearance of the header row in a PdfGrid. [...]
clear() → void
Removes all the header information in the PdfGrid. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]
operator [](int index) PdfGridRow
Gets a PdfGridRow object that represents the header row in a PdfGridHeaderCollection control. [...]