xxxxxxxxxx
Text(
errMessage,
style: const TextStyle(
color: Colors.red,
fontSize: 12,
fontWeight: FontWeight.w900,
),
),
xxxxxxxxxx
new Text(
'Welcome to Flutter Tutorial.',
style: TextStyle(
color: Colors.blue,
),
)
xxxxxxxxxx
Flutter Html Widget
Html(
data: 'my text',
style: {
"body": Style(
fontSize: FontSize(18.0),
fontWeight: FontWeight.bold,
),
},
)
xxxxxxxxxx
---- Using style property (backgroundColor)
Text(
'Some text...',
style: TextStyle(backgroundColor: Colors.blue),
)
---- Using style property (background)
Text(
'Some text...',
style: TextStyle(background: Paint()..color = Colors.blue),
)
---- Using a DecoratedBox
const DecoratedBox(
decoration: const BoxDecoration(color: Colors.blue),
child: const Text('Some text...'),
);
xxxxxxxxxx
Text(
"Welcome to AllAboutFlutter",
style: TextStyle(
fontSize: 32.0,
),
),