Is it possible to get the String value from a Text() Widget after it is defined?
Example code
Text txt = Text("example text");
getValueFromtxt() {
var value = txt.text; <------
}
@override
Widget build(BuildContext context) {
return txt;
}
buildmethod is for), usually by callingsetStatein one of the parent widgets. It's the same technique that powers the React framework.