isReadOnly property
If true the TextField is clickable, selectable and focusable but not editable.
For it to work you must set readOnly property of TextField.readOnly to :
final myText = RM.injectedTextEditing();
TextField(
readOnly: myText.isReadOnly,
)
Implementation
@override
bool get isReadOnly {
ReactiveStatelessWidget.addToObs?.call(this);
controller;
if (_isReadOnly != null) {
return _isReadOnly!;
}
final isFormReadOnly = (form as InjectedFormImp?)?._isReadOnly;
if (isFormReadOnly != null) {
return isFormReadOnly;
}
return false;
}
If true the TextField is clickable, selectable and focusable but not editable.
For it to work you must set readOnly property of TextField.readOnly to :
final myText = RM.injectedTextEditing();
TextField(
readOnly: myText.isReadOnly,
)
Implementation
@override
set isReadOnly(bool? val) {
_isReadOnly = val;
notify();
}