IF you want to get the TextField value in flutter? Create your TextEditingController as a global variable in your State class and set it into your TextField widget.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | TextEditingController emailController = new TextEditingController(); .... TextField( controller: emailController, obscureText: true, textAlign: TextAlign.left, decoration: InputDecoration( border: InputBorder.none, hintText: 'PLEASE ENTER YOUR EMAIL', hintStyle: TextStyle(color: Colors.grey), ), ) |
Now you can get the value using:
1 | emailController.text |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.