brush property
PdfBrush?
get
brush
Gets or sets the brush, which specifies the pen behavior.
//Create a new PDF document.
PdfDocument document = PdfDocument()
..pages.add().graphics.drawRectangle(
//Set brush
pen: PdfPen(PdfColor(255, 0, 0))..brush = PdfBrushes.green,
bounds: Rect.fromLTWH(10, 10, 200, 100));
//Save the document.
List<int> bytes = await document.save();
//Close the document.
document.dispose();
Implementation
PdfBrush? get brush => _brush;
set
brush
(PdfBrush? value)
Implementation
set brush(PdfBrush? value) {
_checkImmutability();
_setBrush(value);
}