PdfStandardFont constructor Null safety

  1. PdfFontFamily fontFamily,
  2. double size,
  3. {PdfFontStyle? style,
  4. List<PdfFontStyle>? multiStyle}

Initializes a new instance of the PdfStandardFont class with font family, size and font style.

//Create a new PDF document.
PdfDocument document = PdfDocument()
      'Hello World!', PdfStandardFont(PdfFontFamily.helvetica, 12),
      brush: PdfBrushes.black);
//Save the document.
List<int> bytes = document.save();
//Close the document.


PdfStandardFont(PdfFontFamily fontFamily, double size,
    {PdfFontStyle? style, List<PdfFontStyle>? multiStyle}) {
  _initialize(size, style: style, multiStyle: multiStyle);
  _fontFamily = fontFamily;