actions property

PdfFieldActions get actions

Gets the actions of the field.{Read-Only}

Implementation

PdfFieldActions get actions {
  if (_helper.isLoadedField && _helper.actions == null) {
    if (_helper.dictionary!.containsKey(PdfDictionaryProperties.aa)) {
      final PdfDictionary actionDict = _helper.crossTable!
              .getObject(_helper.dictionary![PdfDictionaryProperties.aa])!
          as PdfDictionary;
      _helper.actions = PdfFieldActionsHelper.load(actionDict);
      _helper.widget!.actions =
          PdfFieldActionsHelper.getHelper(_helper.actions!).annotationActions;
    } else {
      _helper.actions = PdfFieldActionsHelper.load(PdfDictionary());
      _helper.dictionary!
          .setProperty(PdfDictionaryProperties.aa, _helper.actions);
    }
    _helper.changed = true;
  } else {
    if (_helper.actions == null) {
      _helper.actions = PdfFieldActions(_helper.widget!.actions!);
      _helper.dictionary!
          .setProperty(PdfDictionaryProperties.aa, _helper.actions);
    }
  }
  return _helper.actions!;
}