How do you change the value inside of a textfield flutter?

后端 未结 10 1695
忘掉有多难
忘掉有多难 2020-12-06 08:49

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

10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-06 09:34

    First Thing

      TextEditingController MyController= new TextEditingController();
    

    Then add it to init State or in any SetState

        MyController.value = TextEditingValue(text: "ANY TEXT");
    

提交回复
热议问题