value property

dynamic value

Gets or sets the value of the cell.

//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
PdfGridRow header = grid.headers.add(1)[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';
//Apply the cell style to specific row cells
PdfGridCell gridCell = PdfGridCell(
    row: row1,
    format: PdfStringFormat(
        alignment: PdfTextAlignment.center,
        lineAlignment: PdfVerticalAlignment.bottom,
        wordSpacing: 10));
gridCell.value = '\$10,000';
row1.cells[2].value = gridCell.value;
row1.cells[2].stringFormat = gridCell.stringFormat;
PdfGridRow row2 = grid.rows.add();
row2.cells[0].value = 'E02';
row2.cells[1].value = 'Simon';
row2.cells[2].value = '\$12,000';
//Draw the grid in PDF document page
grid.draw(
    page: document.pages.add(), bounds: Rect.zero);
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();

Implementation

dynamic get value => _value;
void value=(dynamic value)

Implementation

set value(dynamic value) {
  _value = value;
  _setValue(value);
}