by @kodeazy
flutter how to change the color of Text() widget in flutter?
In this blog we will discuss on how to change the color
of Text
widget in flutter.
To change the color of Text()
widget in flutter we use of TextStyle
widget.
Below is an example syntax.
Text("Color Example", style: TextStyle(color: Colors.green),)
Below is an example program to change the color of the Text
widget to green
in flutter.
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: Text("Color Example", style: TextStyle(color: Colors.green),),
));
}