brush property

PdfBrush? brush
getter/setter pair

Get or sets the brush.

//Create a new Pdf document
PdfDocument document = PdfDocument();
//Create the web link in the PDF page
PdfTextWebLink textWebLink = PdfTextWebLink(
    url: 'www.google.co.in',
    text: 'google',
    font: PdfStandardFont(PdfFontFamily.timesRoman, 14),
    pen: PdfPens.brown,
    format: PdfStringFormat(
        alignment: PdfTextAlignment.center,
        lineAlignment: PdfVerticalAlignment.middle));
//Gets or sets the brush
textWebLink.brush = PdfSolidBrush(PdfColor(0, 0, 0));
//Draw the web link in the PDF page
textWebLink.draw(document.pages.add(), Offset(50, 40));
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();

Implementation

PdfBrush? brush;