readOnly property

bool get readOnly

Gets or sets a value indicating whether this PdfField field is read-only.

The default value is false.

Implementation

bool get readOnly {
  if (_fieldHelper.isLoadedField) {
    _fieldHelper._readOnly = _fieldHelper.isFlagPresent(FieldFlags.readOnly);
    return _fieldHelper._readOnly || form!.readOnly;
  }
  return _fieldHelper._readOnly;
}
set readOnly (bool value)

Implementation

set readOnly(bool value) {
  if (_fieldHelper.isLoadedField) {
    value || form!.readOnly
        ? _fieldHelper.setFlags(<FieldFlags>[FieldFlags.readOnly])
        : _fieldHelper.removeFlag(FieldFlags.readOnly);
  }
  _fieldHelper._readOnly = value;
}