I have a TextField with an onSubmit callback. In this callback, I do some sets, then call setState(() {}); and finally do another property set. In tracing this code through the debugger, the onSubmit is completing all the lines and then the setState is occurring. So it doesn't appear setState is being called synchronously. If I remove the setState, no refresh occurs so I am pretty sure the setState is not coming from somewhere else. What am I missing?
Offending code:
Function secToAnsOnSubmit = (String value) {
int integer = int.tryParse(value);
if (integer != null && integer >= qzCfgInfListsMl.secondsToAnswerMin) {
qzCfgInfListsMl.secondsToAnswer = integer;
}
setState(() {});
_textEditingControllerInUse1 = false;
};