-
-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextField readonly does not work when referencing a variable defined by a checkbox #75
Comments
Same applies for FormBuilderRadio |
I being trying to debug the problem, and moving the line |
Thanks very much!!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TextField readonly does not work when referencing a variable defined by a checkbox.
Example:
Expanded(
child: FormBuilderTextField(
attribute: 'textField',
controller: textFieldController,
readonly: _disableTextField, // This does not work
decoration: InputDecoration(
labelText: _disableTextField ? 'Disabled' : 'Enabled', // This works
),
)
),
Expanded(
child: FormBuilderCheckbox(
attribute: 'checkBox',
initialValue: false,
onChanged: (val) {
setState(() {
if (val) {
textFieldController.clear();
_disableTextField= true;
} else {
_disableTextField= false;
}
});
},
)
)
In the example above, label switching works, but deactivation of the field does not work
Need help. Thanks in advance
The text was updated successfully, but these errors were encountered: