flutter change color of text 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: flutter font bold

Text(
  'Some text',
  style: TextStyle(
    fontSize: 24,
    fontWeight: FontWeight.bold),
)

Example 3: flutter text color

new Text(
  'Welcome to Flutter Tutorial.',
  style: TextStyle(
    color: Colors.blue,
  ),
)

Example 4: italic text flutter

Text(
  "Welcome to the present, we're running a real nation.",
  style: TextStyle(fontStyle: FontStyle.italic),
)

Example 5: color textfield text flutter

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

Example 6: how to style text in flutter

Text(
'text'
style: TextStyle(),
),

Tags:

Dart Example