text property

String? get text

Gets marker text.

//Create a new PDF document.
PdfDocument document = PdfDocument();
//Create a new unordered list.
PdfUnorderedList(
    items: PdfListItemCollection(['Essential tools', 'Essential grid']),
    font: PdfStandardFont(PdfFontFamily.helvetica, 16,
        style: PdfFontStyle.italic),
    marker: PdfUnorderedMarker(text: 'Text'))
  ..draw(
      page: document.pages.add(), bounds: const Rect.fromLTWH(20, 20, 0, 0));
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();

Implementation

String? get text => _text;
set text (String? value)

Implementation

set text(String? value) {
  if (value != null) {
    _text = value;
    style = PdfUnorderedMarkerStyle.customString;
  }
}