uri property

String get uri

Gets the Uri address.

Implementation

String get uri {
  if (PdfAnnotationHelper.getHelper(this).isLoadedAnnotation) {
    return _getUriText()!;
  } else {
    return _uri;
  }
}
set uri (String value)

Sets the Uri address.

Implementation

set uri(String value) {
  final PdfAnnotationHelper helper = PdfAnnotationHelper.getHelper(this);
  final PdfDictionary tempDictionary = helper.dictionary!;
  if (helper.isLoadedAnnotation) {
    if (_uri != value) {
      _uri = value;
      if (tempDictionary.containsKey(PdfDictionaryProperties.a)) {
        final PdfDictionary? dictionary = PdfCrossTable.dereference(
            tempDictionary[PdfDictionaryProperties.a]) as PdfDictionary?;
        if (dictionary != null) {
          dictionary.setString(PdfDictionaryProperties.uri, _uri);
          dictionary.modify();
        }
      }
    }
  } else {
    _uri = value;
    if (_helper._uriAction!.uri != value) {
      _helper._uriAction!.uri = value;
      if (helper.isLoadedAnnotation) {
        PdfDictionary? dictionary = tempDictionary;
        if (tempDictionary.containsKey(PdfDictionaryProperties.a)) {
          dictionary = PdfCrossTable.dereference(
              tempDictionary[PdfDictionaryProperties.a]) as PdfDictionary?;
          if (dictionary != null) {
            dictionary.setString(PdfDictionaryProperties.uri, _uri);
          }
          tempDictionary.modify();
        }
      }
    }
  }
}