late final TextEditingController _weight = TextEditingController()
late final TextEditingController _height = TextEditingController()
For example, for these two TextEditingControllers, I want to collect the values entered by the user and print them in Text. How do I code this?
2
Answers
You access the text by checking the
text
property. In your example, e.g.:You can try to parse
text
property like this:I suggest you force keyboard to insert only numbers with:
in your
TextField