How can I use controller as a string?
245
You need to access the text
property.
TextEditingController.text
Replace it with your controller's name. i.e
usernameController.text
Author by
Kapil Kumar
Updated on December 01, 2022Comments
-
Kapil Kumar over 1 year
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?
-
pskink almost 3 years
TextEditingController.text
? -
Arslan Kaleem almost 3 yearsYou want the data of texteditingcontroller or controller itself. If you want controller data simply pass texteditingcontroller.text
-
Kapil Kumar almost 3 yearsthanks, it worked!!
-