**이 페이지에서 알 수 있는 내용 このページからわかること
- RichText
- TextSpan
- TextStyle
- TapGestureRecognizer()
- cascade notation**
main.dart
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
RichText(
text: TextSpan(
style: const TextStyle(
color: Colors.black,
),
children: [
const TextSpan(text: 'You have '),
TextSpan(
text: 'pushed ',
style: TextStyle(
color: Colors.red,
fontWeight: FontWeight.bold,
fontSize: 20,
),
recognizer: TapGestureRecognizer()
..onTap = () { // .. cascade notation
print('pushedがタップされました');
}
),
const TextSpan(
text: 'button this many times',
style: TextStyle(
color: Colors.green,
),
),
]),
),
],
),
),
);
}
}

TextSpan
특정 길이의 문자를 한 단위로 하여 스타일을 적용하는데 사용되는 위젯
特定長さの文字を一つの単位にしてスタイルを適用するために使用されるウイジェット
TextStyle
텍스트에 다양한 효과를 적용하기 위해 속성을 지정하는 위젯
テキストに様々な効果を適用ために属性を指定するウイジェット
TapGestureRecognizer()
터치를 했는지 인식하는 위젯
タッチしたがどうかを認識するウイジェット
cascade notation