PdfGridRow class Null safety

Provides customization of the settings for the particular row.

//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
grid.headers.add(2);
PdfGridRow header = grid.headers[0];
header.cells[0].value = 'Employee ID';
header.cells[1].value = 'Employee Name';
header.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 row span
row1.cells[1].rowSpan = 2;
//Set the row height
row2.height = 20;
//Set the row style
row1.style = PdfGridRowStyle(
    backgroundBrush: PdfBrushes.dimGray,
    textPen: PdfPens.lightGoldenrodYellow,
    textBrush: PdfBrushes.darkOrange,
    font: PdfStandardFont(PdfFontFamily.timesRoman, 12));
//Draw the grid in PDF document page
grid.draw(
    page: document.pages.add(), bounds: const Rect.fromLTWH(0, 0, 0, 0));
//Save the document.
List<int> bytes = document.save();
//Dispose the document.
document.dispose();

Constructors

PdfGridRow(PdfGrid grid, {PdfGridRowStyle? style, double? height})
Initializes a new instance of the PdfGridRow class with the parent grid. [...]

Properties

cells PdfGridCellCollection
Gets the cells from the selected row. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
height double
Gets or sets the height of the row. [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
style PdfGridRowStyle
Gets or sets the row style. [...]
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited