仅作备忘录,无可读性
零:APP结构
import 'package:flutter/material.dart';
class TextDemo extends StatelessWidget {
const TextDemo({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("首页"),
leading: Icon(Icons.menu),
actions: [
Icon(Icons.settings)
],
elevation: 0.0,
centerTitle: true,
),
body: HelloText(),
);
}
}
class HelloText extends StatelessWidget {
const HelloText({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column(
children: const [
Text(
"你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好",
textDirection: TextDirection.ltr,
style: TextStyle(
fontSize: 30,
color: Colors.blue,
fontWeight: FontWeight.w500,
fontStyle: FontStyle.italic,
decoration: TextDecoration.lineThrough,
decorationColor: Colors.yellow
),
textAlign: TextAlign.right,
maxLines: 3,
overflow: TextOverflow.ellipsis,
textScaleFactor: 1.5,
)
],
);
}
}
2.Icon
3.color
4.按钮
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)