validator: (value) {
if (value.isEmpty) {
_casing.depth = 0;
} else if (double.tryParse(value) != null) {
// setState(() {
_casing.depth = double.tryParse(value);
// });
} else {
_casing.depth = 0;
return kTextFieldError;
}
return null;
},
This returns an error that says unable to setState while currently doing so. What I need is as the user inputs (or finishes either by clicking ok or tapping anywhere which automatically hides keyboard), I want to use the input value to calculate numbers in the parent widget