Tags
Flutter
Asked 3 years ago
12 Oct 2021
Views 3036
Rickie

Rickie posted

Flutter - how to apply background color to TextField widget ?

noob

noob
answered Oct 12 '21 00:00

TextField had decoration attribute , where you can assign the InputDecoration properties - fillColor: Colors.grey and filled:true to get grey background color for TextField.


fillColor: Colors.grey,
filled: true,



TextField Widget , background color example :

TextField(   decoration: const InputDecoration(
                 fillColor: Colors.grey,filled: true,
                  border: OutlineInputBorder(),
                  hintText: 'Enter a search term'),
            )
Post Answer