EndItemLayoutCallback typedef Null safety

EndItemLayoutCallback = void Function(Object sender, EndItemLayoutArgs args)

typedef for handling EndItemLayoutEvent.

//Create a new PDF document.
PdfDocument document = PdfDocument();
//Create a new list.
    text: 'PDF\nXlsIO\nDocIO\nPPT',
    font: PdfStandardFont(PdfFontFamily.helvetica, 16,
        style: PdfFontStyle.italic),
    format: PdfStringFormat(lineSpacing: 20))
  //Begin item layout event.
  ..beginItemLayout = (Object sender, BeginItemLayoutArgs args) {
    args.item.text += '_Beginsave';
  //End item layout event.
  ..endItemLayout = (Object sender, EndItemLayoutArgs args) {
        brush: PdfBrushes.red,
        bounds: const Rect.fromLTWH(400, 400, 100, 100));
      page: document.pages.add(), bounds: const Rect.fromLTWH(20, 20, 0, 0));
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.


typedef EndItemLayoutCallback = void Function(
    Object sender, EndItemLayoutArgs args);