top property

double get top

Gets or sets the top margin size.

//Creates a new PDF document.
PdfDocument document = PdfDocument()
  //Create and set new PDF margin.
  ..pageSettings.margins = (PdfMargins()
    ..left = 20
    ..right = 40
    ..top = 100
    ..bottom = 100)
  ..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

double get top => _top;
set top (double value)

Implementation

set top(double value) {
  if (_top != value && !_helper.isPageAdded) {
    _top = value;
  }
}