- 博客(6)
- 资源 (20)
- 收藏
- 关注
原创 flutter: You used a `BuildContext` that is an ancestor of the provider you are trying to read
当在StatefulWidget中使用ChangeNotifierProvider绑定ViewModel,就会报如上错误,完整的错误日志如下Error: Could not find the correct Provider<RecordTopViewModel> above this RecordTop WidgetThis likely happens because you used a `BuildContext` that does not include the p..
2020-10-30 13:09:14 1626
原创 error: The argument type ‘Function‘ can‘t be assigned to the parameter type ‘void Function()‘.
出错的代码如下:解决方案:声明部分的写法改为:final void Function() onTap;
2020-10-23 13:54:14 6691
原创 Flutter : 安装环境总结
官网的说明:https://flutterchina.club/setup-macos/但是个人感觉有点别扭,记录下自己的环境安装流程1. AndroidStudio->preferences->Plugins, 搜索到Flutter插件点击安装,然后重启IDE2. 打开终端,输入:export PUB_HOSTED_URL=https://pub.flutter-io.cnexport FLUTTER_STORAGE_BASE_URL=https://stor...
2020-10-15 12:08:07 276
转载 java.net.UnknownServiceException: CLEARTEXT communication to XX not permitted by network security
https://blog.csdn.net/qq_37684824/article/details/89681392原因;翻译过来就是安卓9加强了保密性,导致无法进行非加密的http网络请求。
2020-10-07 13:14:22 256
原创 Android:bottomSheet效果的下拉拖拽功能总结
效果如动图所示,Android中要对布局中的控件进行自由拖动,一般有两种实现方法:方法1:重写父类点击事件的方法, 对触摸事件进行处理。方法2: 利用ViewDragHelper接管触摸操作来处理触摸事件。 gif图所用的便是方法2。ViewDragHelper提供的callback(ViewDragHelper.Callback)针对 ViewGroup 中的拖拽和重新定位 views 操作时提供了一系列非常有用的方法。下面贴出Demo的核心代码:布局:...
2020-10-05 11:29:41 858
原创 Android:This usually happens when two views of different type have the same id in the same hierarchy
这个崩溃于旋转屏幕的时候,从纵向布局切换到横向布局的时候发生:java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.os.Bundle instead. This usually happens when two views of different type have the same id in the same hierarchy. This .
2020-10-02 14:13:08 1248
Android-Notification(兼容8.0+以及8.0以下).zip
2019-11-20
Android批量申请权限.zip
2019-11-05
Android-FCM云消息集成Demo.zip
2019-11-01
Android软键盘返回键监听.zip
2019-10-22
Android 可拖拽移动的RecyclerView
2019-06-26
Android 伸缩布局
2019-06-24
PictureSelector集成Demo
2019-02-20
Android 拍照和相册选取+图片压缩功能
2019-01-02
Android 自定义侧边栏列表
2018-12-24
Android 悬浮Activity ( Dialog风格)
2018-12-20
Android 底部导航栏凸出点击
2018-12-20
Android 离线语音识别技术PocketSphinx的Demo
2018-12-11
XRefreshView+MultiTypeAdapter的强大列表
2018-08-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人