defaultLayer property
PdfPageLayer
get
defaultLayer
Gets the default layer of the page (Read only).
//Create a new PDF documentation
PdfDocument document = PdfDocument();
//Create a new PDF page and gets the default layer
PdfPageLayer defaultLayer = document.pages.add().defaultLayer;
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();
Implementation
PdfPageLayer get defaultLayer => layers[defaultLayerIndex];