How can I change the color of an string-input in a TextField?

Question

Asked by Mauricio D on May 04, 2018 (source).

I am working in the styles of my app, i am not able to change the color of the input of the TextField, there isn't any property to change it.

 Theme(
            data: new ThemeData(
              hintColor: Colors.white
            ),
            child:
        TextField(
          focusNode: _focusUsername,
          controller: _controller,
          decoration: InputDecoration(
            border: InputBorder.none,
            fillColor: Colors.grey,
            filled: true,
            hintText: 'Username',
          ))),

Answer

Question answered by Günter Z (source).

You can assign a TextStyle

TextField(
  style: TextStyle(color: Colors.white),
  ...
)

https://docs.flutter.io/flutter/painting/TextStyle-class.html

DART FLUTTER
SHARE: