仅作备忘录,无可读性
零:APP结构
    
一:基本组件
1.文本组件

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.按钮
     
5.图片
 
6.列表
 
7.ios风格组件

二:布局
1.container

2.线性布局

3.弹性布局

4.流式布局

5.层叠布局

6.网格布局


7.card

|