PdfSignatureField constructor

PdfSignatureField(
  1. PdfPage page,
  2. String name, {
  3. Rect bounds = Rect.zero,
  4. int? borderWidth,
  5. PdfHighlightMode? highlightMode,
  6. PdfSignature? signature,
  7. String? tooltip,
  8. PdfColor? backColor,
  9. PdfColor? borderColor,
  10. PdfBorderStyle? borderStyle,
})

Initializes a new instance of the PdfSignatureField class.

Implementation

PdfSignatureField(PdfPage page, String name,
    {Rect bounds = Rect.zero,
    int? borderWidth,
    PdfHighlightMode? highlightMode,
    PdfSignature? signature,
    String? tooltip,
    PdfColor? backColor,
    PdfColor? borderColor,
    PdfBorderStyle? borderStyle}) {
  _helper = PdfSignatureFieldHelper(this);
  _helper.internal(page, name, bounds,
      borderWidth: borderWidth,
      highlightMode: highlightMode,
      tooltip: tooltip,
      backColor: backColor,
      borderColor: borderColor,
      borderStyle: borderStyle);
  form!.fieldAutoNaming
      ? PdfAnnotationHelper.getHelper(_helper.widget!)
          .dictionary!
          .setProperty(PdfDictionaryProperties.ft,
              PdfName(PdfDictionaryProperties.sig))
      : _helper.dictionary!.setProperty(
          PdfDictionaryProperties.ft, PdfName(PdfDictionaryProperties.sig));
  if (PdfPageHelper.getHelper(page).document != null) {
    PdfFormHelper.getHelper(form!).signatureFlags = <SignatureFlags>[
      SignatureFlags.signaturesExists,
      SignatureFlags.appendOnly
    ];
  }
  if (signature != null) {
    this.signature = signature;
  }
  if (borderWidth != null ||
      borderColor != null ||
      backColor != null ||
      borderStyle != null) {
    _helper.appearance = true;
  }
}