template property
PdfTemplate?
get
template
Gets or sets template of the marker.
//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(template: (PdfTemplate(100, 100)
..graphics!.drawRectangle(
brush: PdfBrushes.red,
bounds: const Rect.fromLTWH(0, 0, 100, 100)))))
..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
PdfTemplate? get template => _template;
set
template
(PdfTemplate? value)
Implementation
set template(PdfTemplate? value) {
if (value != null) {
_template = value;
style = PdfUnorderedMarkerStyle.customTemplate;
}
}