xxxxxxxxxx
// The Text widget displays a string of text with single style.
Text(
'Hello, $_name! How are you?',
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontWeight: FontWeight.bold),
)
Text(
'Hello, $_name! How are you?',
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontWeight: FontWeight.bold),
)
xxxxxxxxxx
Text(
'Hello',
textAlign: TextAlign.center,
style: const TextStyle(fontWeight: FontWeight.bold),
)
xxxxxxxxxx
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Text(
'Hello, Flutter!',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
),
),
);
}
}