上一页 1 2 3 4 5 6 7 8 ··· 30 下一页
摘要: 在 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 苦瓜爆炒牛肉 阅读(1251) 评论(0) 推荐(0) 编辑
摘要: ListView的常见参数: 名称 类型 说明 scrollDirection Axis Axis.horizontal 水平列表 Axis.vertical 垂直列表 padding EdgeInsetsGeometry 内边距 resolve bool 组件反向排序 children List< 阅读全文
posted @ 2019-12-05 14:42 苦瓜爆炒牛肉 阅读(1259) 评论(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 苦瓜爆炒牛肉 阅读(1099) 评论(0) 推荐(0) 编辑
摘要: 名称 功能 alignment topCenter:顶部居中对齐 topLeft:顶部左对齐 topRight:顶部右对齐 center:水平垂直居中对齐 centerLeft:垂直居中水平居左对齐 centerRight:垂直居中水平居右对齐 bottomCenter 底部居中对齐 bottomL 阅读全文
posted @ 2019-12-05 10:13 苦瓜爆炒牛肉 阅读(1020) 评论(0) 推荐(0) 编辑
摘要: 名称 功能 textAlign 文本对齐方式(center 居中,left 左 对齐,right 右对齐,justfy 两端对齐) textDirection 文本方向(ltr 从左至右,rtl 从右至 左) overflow 文字超出屏幕之后的处理方式(clip 裁剪,fade 渐隐,ellips 阅读全文
posted @ 2019-12-05 10:05 苦瓜爆炒牛肉 阅读(1394) 评论(0) 推荐(0) 编辑
摘要: Dart中的库主要有三种: 1、我们自定义的库 import 'lib/xxx.dart'; 2、系统内置库 import 'dart:math'; import 'dart:io'; import 'dart:convert'; 3、Pub包管理系统中的库 https://pub.dev/pack 阅读全文
posted @ 2019-12-04 16:09 苦瓜爆炒牛肉 阅读(648) 评论(0) 推荐(0) 编辑
摘要: Dart是一门使用类和单继承的面向对象语言,所有的对象都是类的实例,并且所有的类都是Object的子类。 面向对象编程(OOP)的三个基本特征是:封装、继承、多态 封装:封装是对象和类概念的主要特性。封装,把客观事物封装成抽象的类,并且把自己的部分属性和方法提供给其他对象调用, 而一部分属性和方法则 阅读全文
posted @ 2019-12-03 14:42 苦瓜爆炒牛肉 阅读(1157) 评论(0) 推荐(0) 编辑
摘要: void main() { // 匿名方法 var printSomethings = () { print("somethings"); }; printSomethings(); var printNum = (int n) { print(n + 2); }; printNum(10); // 阅读全文
posted @ 2019-12-03 09:42 苦瓜爆炒牛肉 阅读(544) 评论(0) 推荐(0) 编辑
摘要: List里面常用的属性和方法: 常用属性: length 长度 reversed 翻转 isEmpty 是否为空 isNotEmpty 是否不为空 常用方法: add 增加 addAll 拼接数组 indexOf 查找 传入具体值 remove 删除 传入具体值 removeAt 删除 传入索引值 阅读全文
posted @ 2019-12-02 17:23 苦瓜爆炒牛肉 阅读(1520) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 30 下一页