I want to pass the controller as a String in an argument but the controller is of TextEditingController type. How can I change the type of controller as a String?
Asked
Active
Viewed 443 times
1
-
`TextEditingController.text` ? – pskink May 05 '21 at 18:33
-
You want the data of texteditingcontroller or controller itself. If you want controller data simply pass texteditingcontroller.text – Arslan Kaleem May 05 '21 at 18:34
-
thanks, it worked!! – Kapil Kumar May 05 '21 at 19:00
1 Answers
0
You need to access the text
property.
TextEditingController.text
Replace it with your controller's name. i.e
usernameController.text

Huthaifa Muayyad
- 11,321
- 3
- 17
- 49