摘要: Expanded组件可以结合Row和Column布局组件使用。 Expanded组件的常用属性 属性 说明 flex 元素占整个父Row/Column的比例 child 子元素 import 'package:flutter/material.dart'; void main() { runApp( 阅读全文
posted @ 2019-12-05 17:46 苦瓜爆炒牛肉 阅读(1994) 评论(0) 推荐(0) 编辑
摘要: Column组件的常用属性 属性 说明 mainAxisAlignment 主轴的排序方式 crossAxisAlignment 次轴的排序方式 children 组件子元素 import 'package:flutter/material.dart'; void main() { runApp(M 阅读全文
posted @ 2019-12-05 17:30 苦瓜爆炒牛肉 阅读(511) 评论(0) 推荐(0) 编辑
摘要: Row组件的常用属性 属性 说明 mainAxisAlignment 主轴的排序方式 crossAxisAlignment 次轴的排序方式 children 组件子元素 import 'package:flutter/material.dart'; void main() { runApp(Mate 阅读全文
posted @ 2019-12-05 17:21 苦瓜爆炒牛肉 阅读(2053) 评论(0) 推荐(0) 编辑
摘要: 在 html 中常见的布局标签都有 padding 属性,但是 Flutter 中很多 Widget 是没有 padding 属性。这个时候我们可以用 Padding 组件处理容器与子元素直接的间距。 属性 说明 padding padding值,EdgeInsetss设置填充的值 child 子组 阅读全文
posted @ 2019-12-05 16:53 苦瓜爆炒牛肉 阅读(674) 评论(0) 推荐(0) 编辑
摘要: GridView组件的常用参数: 名称 类型 说明 scrollDirection Axis 滚动方法 padding EdgeInsetsGeometry 内边距 resolve bool 组件反向排序 crossAxisSpacing double 水平子 Widget 之间间距 mainAxi 阅读全文
posted @ 2019-12-05 15:59 苦瓜爆炒牛肉 阅读(1261) 评论(0) 推荐(0) 编辑
摘要: ListView的常见参数: 名称 类型 说明 scrollDirection Axis Axis.horizontal 水平列表 Axis.vertical 垂直列表 padding EdgeInsetsGeometry 内边距 resolve bool 组件反向排序 children List< 阅读全文
posted @ 2019-12-05 14:42 苦瓜爆炒牛肉 阅读(1267) 评论(0) 推荐(0) 编辑
摘要: Image组件有很多构造函数,这里只说两个。 Image.asset 本地图片 1.在根目录新建文件夹 /images 2.在 images 文件夹下建立两个文件夹 /images/2.0x /images/3.0x 3.在 /image 下放最小的图片,依次放较大的图片在 2.0x,3.0x 4. 阅读全文
posted @ 2019-12-05 10:52 苦瓜爆炒牛肉 阅读(1101) 评论(0) 推荐(0) 编辑
摘要: 名称 功能 alignment topCenter:顶部居中对齐 topLeft:顶部左对齐 topRight:顶部右对齐 center:水平垂直居中对齐 centerLeft:垂直居中水平居左对齐 centerRight:垂直居中水平居右对齐 bottomCenter 底部居中对齐 bottomL 阅读全文
posted @ 2019-12-05 10:13 苦瓜爆炒牛肉 阅读(1024) 评论(0) 推荐(0) 编辑
摘要: 名称 功能 textAlign 文本对齐方式(center 居中,left 左 对齐,right 右对齐,justfy 两端对齐) textDirection 文本方向(ltr 从左至右,rtl 从右至 左) overflow 文字超出屏幕之后的处理方式(clip 裁剪,fade 渐隐,ellips 阅读全文
posted @ 2019-12-05 10:05 苦瓜爆炒牛肉 阅读(1396) 评论(0) 推荐(0) 编辑