textfield color flutter code example

Example 1: change border color of TextField in flutter

TextFormField(
        decoration: InputDecoration(
          labelText: "Resevior Name",
          fillColor: Colors.white,
          focusedBorder:OutlineInputBorder(
            borderSide: const BorderSide(color: Colors.white, width: 2.0),
            borderRadius: BorderRadius.circular(25.0),
          ),
        ),
      )

Example 2: text fieldform color flutter

TextField(
  style: TextStyle(color: Colors.red),
  decoration: InputDecoration(fillColor: Colors.orange, filled: true),
)

Example 3: flutter text form field change underline color

decoration: InputDecoration(        
  enabledBorder: UnderlineInputBorder(      
    borderSide: BorderSide(color: theColor),   
  ),  
  focusedBorder: UnderlineInputBorder(
    borderSide: BorderSide(color: theColor),
  ),
  border: UnderlineInputBorder(
    borderSide: BorderSide(color: theColor),
  ),
)

Example 4: color textfield text flutter

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

Example 5: flutter textfield label color

labelStyle: TextStyle(
	color: Colors.white,
)

Tags:

Dart Example