How can I use controller as a string?

508 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 answers

0
Huthaifa Muayyad On BEST ANSWER

You need to access the text property.

TextEditingController.text

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

usernameController.text