09 2019 档案
flultter listview异常type '(BuildContext, int) => dynamic' is not a subtype of type '(BuildContext, int) => Widget'
摘要:type '(BuildContext, int) => dynamic' is not a subtype of type '(BuildContext, int) => Widget' 源码如下: 原因是因为_istviewItemBuilder没写 返回值类型Widget 加上就可以 阅读全文
posted @ 2019-09-26 16:48 mingfeng002 阅读(3533) 评论(0) 推荐(0)
flutter SnackBar异常Another exception was thrown: Scaffold.of() called with a context that does not contain a Scaffold
摘要:代码如下: 当BuildContext在Scaffold之前时,调用Scaffold.of(context)会报错。这时可以通过Builder Widget来解决,代码如下: 阅读全文
posted @ 2019-09-26 15:45 mingfeng002 阅读(1861) 评论(0) 推荐(0)
flutter 处理dialog点击事件回调
摘要:flutter 处理dialog点击事件回调 阅读全文
posted @ 2019-09-25 18:51 mingfeng002 阅读(3570) 评论(0) 推荐(0)
flutter dialog异常Another exception was thrown: Navigator operation requested with a context that does not include a Navigator
摘要:我在使用flutter里的对话框控件的时候遇到了一个奇怪的错误 研究了一下才知道,flutter里的dialog不是随便就能用的。 原代码如下: 点击按钮的时候没有任何反应,控制台的报错是: 分析下源码吧~ 看showDialog方法的源码: Navigator.of 的源码: 找到了一模一样的错误 阅读全文
posted @ 2019-09-25 17:30 mingfeng002 阅读(1322) 评论(0) 推荐(0)
flutter dialog异常Another exception was thrown: No MaterialLocalizations found
摘要:flutter dialog异常Another exception was thrown: No MaterialLocalizations found 这里顶层的context所在的Widget的顶层Widget属于StatefulWidget为什么还不能显示dialog呢 这里发现 这个Floa 阅读全文
posted @ 2019-09-25 17:30 mingfeng002 阅读(1719) 评论(0) 推荐(0)
Parcel在binder通信readStrongBinder和writeStrongBinder
摘要:Binder IPC通信中,Binder是通信的媒介,Parcel是通信的內容。远程调用过程中,其参数都被打包成Parcel的形式来传递。 在IPC通信的Proxy端,我们经常可以看到下面类似的代码,一些参数都会打包到Parcel中。看下面的data和reply。 在IPC通信里,android是通 阅读全文
posted @ 2019-09-11 17:50 mingfeng002 阅读(3241) 评论(0) 推荐(0)
深入理解任何Binder Client都可以直接通过ServiceManager的0这个Binder句柄创建一个BpBinde
摘要:ServiceManager是安卓中一个重要的类,用于管理所有的系统服务,维护着系统服务和客户端的binder通信。对此陌生的可以先看系统服务与ServiceManager来了解应用层是如何使用ServiceManager的。我们可以通过 ServiceManager.getService(Stri 阅读全文
posted @ 2019-09-10 18:36 mingfeng002 阅读(932) 评论(0) 推荐(0)