readOnly property Null safety

bool readOnly

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

The default value is false.

Implementation

bool get readOnly {
  if (_isLoadedField) {
    _readOnly = _isFlagPresent(_FieldFlags.readOnly);
    return _readOnly || form!.readOnly;
  }
  return _readOnly;
}
void readOnly=(bool value)

Implementation

set readOnly(bool value) {
  if (_isLoadedField) {
    value || form!.readOnly
        ? _setFlags(<_FieldFlags>[_FieldFlags.readOnly])
        : _removeFlag(_FieldFlags.readOnly);
  }
  _readOnly = value;
}