I have a TextEditingController where if a user clicks a button it fills in with information. I can't seem to figure out how to change the text inside of a Textfield or TextFormField. Is there a solution?
TextEditingController
Textfield
TextFormField
Simply change the text property
text
TextField( controller: txt, ), RaisedButton(onPressed: () { txt.text = "My Stringt"; }),
while txt is just a TextEditingController
txt
var txt = TextEditingController();
1.4m articles
1.4m replys
5 comments
57.0k users