![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
flutter
涛涛147
安静的做自己喜欢的事
展开
-
flutter开启http服务,可用于投屏,或者对外提供接口
var _httpServer = await HttpServer.bind( InternetAddress.anyIPv4, 8081, shared: true,);_httpServer!.listen( (HttpRequest request) async { File file = File(pathUrl); await request.response.addStream(file.openRead()); request.response.原创 2021-12-06 23:44:55 · 4951 阅读 · 0 评论 -
A FocusScopeNode was used after being disposed.
检查代码里是否 提前调用了FocusScope.of(context).dispose()原创 2020-06-30 11:04:04 · 1310 阅读 · 0 评论 -
flutter 安卓启动黑屏的问题
启动黑屏会存在两个地方一、安卓本身的启动这个只需要在style里设置好就可以了二、在加载flutter的view第一帧时候会短暂黑屏这个你会发现在解决第一个问题的黑屏到加载flutter界面中间还会出现一次黑屏,下面给出解决方式:在安卓的AndroidManifest里:<activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style...原创 2020-06-03 11:05:14 · 1686 阅读 · 0 评论 -
flutter : Failed to find assets path for "Frameworks/App.framework/flutter_assets"错误
这个问题应该会很多时候都会导致,下面放出来github上的解决:https://github.com/flutter/flutter/issues/52084但是我这边出现的不是这个,下边的图是解决方式:检查这三个文件是否存在...原创 2020-04-20 23:30:51 · 3726 阅读 · 0 评论 -
flutter验证手机号码
///大陆手机号码11位数,匹配格式:前三位固定格式+后8位任意数/// 此方法中前三位格式有:/// 13+任意数 * 15+除4的任意数 * 18+除1和4的任意数 * 17+除9的任意数 * 147static bool isChinaPhoneLegal(String str) { return new RegExp('^((13[0-9])|(15[^4])|(166)|(17...原创 2018-07-10 15:37:50 · 13850 阅读 · 0 评论 -
Flutter隐藏控件方法
new Offstage( offstage: true, //这里控制 child: Container(color: Colors.blue,height: 100.0,),),原创 2018-07-26 15:30:00 · 12881 阅读 · 0 评论 -
Flutter : Unimplemented handling of missing static target
这个问题应该是分不同的情况,但是现在网上没什么资料我碰到的问题:在页面写了一个公共带状态的view(StatefulWidget)出现的 , 但是这个问题只出现在了ios端,安卓完全正常(说好的两端一致呢)解决方法:1、了解StatefulWidget里构造函数key的作用;2、了解何时使用GlobalKey;下面贴代码秒懂://view部分class MyView e...原创 2019-08-06 10:58:00 · 11475 阅读 · 0 评论 -
flutter 不能正常上传 packages
出现的问题:It looks like accounts.google.com is having some trouble. Pub will wait for a while before trying to connect again. OS Error: Operation timed out, errno = 60, address = accounts.google.com, po...原创 2019-08-12 19:22:11 · 2419 阅读 · 2 评论