Get the String content from a Text() Widget in Flutter
It's not that difficult I had to use Text().data
:
Text txt = Text("example text");
getValueFromtxt() {
var value = txt.data; <------
}
@override
Widget build(BuildContext context) {
return txt;
}