save method

Uint8List save()

save API.

Implementation

Uint8List save() {
  return SheetTemplate(
    kind: SheetKind.check,
    skin: SheetSkin.checks,
    direction: direction,
    theme: theme,
    font: font,
    fontBold: fontBold,
    owner: owner,
    labels: SheetLabels(
      document: labels.document,
      columns: <String>[labels.item, labels.mark, labels.note],
    ),
    rows: <SheetRow>[
      for (final CheckGroup group in groups) ...<SheetRow>[
        if (group.title.isNotEmpty) SheetRow(<String>[group.title, '', '']),
        for (final CheckItem item in group.items)
          SheetRow(<String>[item.label, labels.word(item.mark), item.note]),
      ],
    ],
    footer: footer.isEmpty ? owner.name : footer,
  ).save();
}