How can I use controller as a string?

526 Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

You need to access the text property.

TextEditingController.text

Replace it with your controller's name. i.e

usernameController.text