flutter基础之Text

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import 'package:flutter/material.dart';

void main()=>runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "flutter入门学习",
home: Scaffold(
body: Center(
child: Text(
"今天开始学习flutter的text组件,我相信总有一天我会成为flutter真正的开发者,加油!打工人",
textAlign: TextAlign.center,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 26.0,
color: Color.fromARGB(255, 255,33,33),
decoration: TextDecoration.lineThrough,
decorationStyle: TextDecorationStyle.dotted,
),
),
),
),
);
}
}