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();
2.1m questions
2.1m answers
60 comments
57.0k users