mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-08-06 00:49:46 +08:00
modify some description
This commit is contained in:
@ -11,19 +11,15 @@ import './demo.dart';
|
||||
const String Text0 = """### **简介**
|
||||
> 跟ConstrainedBox相反,是不添加任何约束条件到child上,让child按照其原始的尺寸渲染
|
||||
- 它的作用就是给child一个尽可能大的空间,不加约束的让其显示。
|
||||
- 如果该widget不能扩展到到足够容纳整个child的空间,child将被裁剪
|
||||
""";
|
||||
|
||||
const String Text1 = """
|
||||
### **基本用法**
|
||||
mainAxisSize 属性
|
||||
- 一行的高度是有mainAxisSize属性控制,默认是max
|
||||
- alignment 属性:控制child对齐方式
|
||||
- textDirection 属性:控制文本对齐
|
||||
- constrainedAxis 属性:如果有,就使用
|
||||
|
||||
mainAxisAlignment属性
|
||||
- 将children放置在主轴某位置
|
||||
|
||||
CrossAxisAlignment 属性
|
||||
- crossAxisAlignment: crossAxisAlignment.center/end/start,
|
||||
- 即,根据设定的位置交叉对齐
|
||||
""";
|
||||
|
||||
class Demo extends StatefulWidget {
|
||||
@ -44,6 +40,7 @@ class _DemoState extends State<Demo> {
|
||||
'https://docs.flutter.io/flutter/widgets/UnconstrainedBox-class.html',
|
||||
contentList: [
|
||||
Text0,
|
||||
Text1,
|
||||
UnconstrainedBoxDemo(),
|
||||
],
|
||||
);
|
||||
|
Reference in New Issue
Block a user