all property
set
all
(double value)
Sets the margins of all side.
//Creates a new PDF document.
PdfDocument document = PdfDocument()
//Create and set new PDF margin.
..pageSettings.margins = (PdfMargins()..all = 20)
..pages.add().graphics.drawString(
'Hello World!', PdfStandardFont(PdfFontFamily.helvetica, 12));
//Saves the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();
Implementation
// ignore: avoid_setters_without_getters
set all(double value) {
if (!_helper.isPageAdded) {
_helper.setMargins(value);
}
}