I know how to validate the text form fields. Therefore, I display an error message when the content of the field is invalid. However, in my case, I have another field that will be enabled when the user checks a CheckBox. In this case, the first field will be disabled.
Now the problem is if I disable the first field when it is showing an error message then this style is still visible when I disable it.
So, my question is, how to clear the error style when I disable the field?
question from:
https://stackoverflow.com/questions/65909775/hoe-to-clear-error-style-of-the-textformfield-when-i-disable-it 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…