会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
braveheart007
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
18
19
20
21
22
23
24
25
26
···
33
下一页
2019年6月2日
Dio练习题2
摘要: 示例有3个文件: main.dart
阅读全文
posted @ 2019-06-02 00:06 braveheart007
阅读(158)
评论(0)
推荐(0)
2019年5月31日
Dio练习题
摘要: lib文件夹分了三个文件 getdiodata.dart model.dart main.dart 注意点:Dio().get()返回的数据是List或者Map,http().get()返回的数据是json数据;Dio().get()比http更方便的地方就是返回的数据是List或者Map,而htt
阅读全文
posted @ 2019-05-31 00:05 braveheart007
阅读(288)
评论(0)
推荐(0)
2019年5月15日
SharePreference
摘要: 知识点:当BuildContext在Scaffold之前时,调用Scaffold.of(context)会报错。这时可以通过Builder Widget来解决:异步操作: save() async{ SharedPreferences prefs = await SharedPreferences.
阅读全文
posted @ 2019-05-15 11:25 braveheart007
阅读(221)
评论(0)
推荐(0)
2019年5月14日
ListView的监听
摘要: ListView可以配合ScrollController使用:创建ScrollController _ScrollController=ScrollController();在initState中监听如下: void initState() { _scrollController.addListen
阅读全文
posted @ 2019-05-14 11:42 braveheart007
阅读(502)
评论(0)
推荐(0)
RefreshIndicator
摘要: 下拉刷新请使用:RefreshIndicator,挺简单,把内容放到child:属性,onRefresh:()async{await}这个无名函数是刷新的具体操作,是一个Future类型的函数。一个具体的示例:import 'package:flutter/material.dart';void m
阅读全文
posted @ 2019-05-14 10:51 braveheart007
阅读(752)
评论(0)
推荐(0)
2019年5月11日
eventbus
摘要: flutter中的eventbus其实就是Stream的一种特殊形式,本质上就是Stream,咱们都知道状态树自父节点向多少有子节点遗传数据采用的是InheritedWidget,自下而上冒泡采用的是Notification,那么同级别的Widget之间传递信息采用的就是EventBus,我从来也记
阅读全文
posted @ 2019-05-11 13:27 braveheart007
阅读(342)
评论(0)
推荐(0)
2019年5月10日
视频讲解硬件知识
摘要: 逆变器原理: https://www.bilibili.com/video/av31480635/?spm_id_from=333.788.videocard.0
阅读全文
posted @ 2019-05-10 12:18 braveheart007
阅读(128)
评论(0)
推荐(0)
TextFromField
摘要: TextFormField是继承了TextFiled, TextFormField一般是放在Form里面使用,可以使用GlobalKey进行控制: 首先在类里面声明GlobalKey,如: 其次在Form里面加入 key:GlobalKey,如: 再次在TextFormFiled里面定义onSave
阅读全文
posted @ 2019-05-10 11:38 braveheart007
阅读(389)
评论(0)
推荐(0)
2019年5月9日
谷歌云 AWS 云服务器 国外 免费申请
摘要: 谷歌云 AWS 云服务器 国外 免费申请
阅读全文
posted @ 2019-05-09 23:17 braveheart007
阅读(505)
评论(0)
推荐(0)
参数传递 PageViewWidget({Key key,@required this.index}):super(key:key);
摘要: 下面的PageViewWidget是构造函数的名字,和类名称相同,可以用任何你喜欢的名字:PageViewWidget({Key key,@required this.index}):super(key:key);widget.index当引用这个类里面的参数的时候,就用类名.参数名,即可引用;在s
阅读全文
posted @ 2019-05-09 23:05 braveheart007
阅读(608)
评论(0)
推荐(0)
上一页
1
···
18
19
20
21
22
23
24
25
26
···
33
下一页
公告