font property

PdfFont? font
getter/setter pair

Holds item font.

//Create a new instance of PdfDocument class.
PdfDocument document = PdfDocument();
//Create a new list.
PdfOrderedList()
  ..items.add(PdfListItem(
      text: 'PDF',
      font: PdfStandardFont(PdfFontFamily.timesRoman, 10),
      format: PdfStringFormat(alignment: PdfTextAlignment.left),
      pen: PdfPens.green,
      brush: PdfBrushes.red))
  ..draw(page: document.pages.add(), bounds: Rect.fromLTWH(10, 10, 0, 0));
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();

Implementation

PdfFont? font;