PdfTemplate class Null safety

Represents PDF Template object.

//Create a new PDF template and draw graphical content like text, images, and more.
PdfDocument document = PdfDocument()
  ..pages.add().graphics.drawPdfTemplate(
      PdfTemplate(100, 50)
        ..graphics!.drawString(
            'Hello World!', PdfStandardFont(PdfFontFamily.helvetica, 14),
            brush: PdfBrushes.black, bounds: Rect.fromLTWH(5, 5, 0, 0)),
      Offset(0, 0));
//Save the document.
List<int> bytes = document.save();
//Dispose the document.
document.dispose();

Constructors

PdfTemplate(double width, double height)
Initializes a new instance of the PdfTemplate class. [...]

Properties

graphics PdfGraphics?
Gets graphics context of the template. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size Size
Gets the size of the template. [...]
read-only

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
reset([double? width, double? height]) → void
Resets an instance. [...]
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited