0.Flutter学习笔记以及问题记录
新建项目
1、Flutter create xxxx 先用命令建好项目再到工具内,打开项目。这样比较快
声明:Flutter专栏文档均来自慕课网 https://coding.imooc.com/class/321.html
Flutter原理介绍(讲的比较透彻和全面的文章)
https://juejin.im/entry/5afa9769518825428630a61c
(免费视频)Dart编程语言基础学习
https://www.imooc.com/learn/1035
(免费视频)Flutter 入门与实战-基础视频学习
https://www.imooc.com/learn/1090
Flutter 从入门到进阶-demo
https://blog.csdn.net/hekaiyou/article/details/78037990
Flutter 增加Json 序列化反序列化
https://juejin.im/post/5b5f00e7e51d45190571172f
Json转Dart 在线工具
https://javiercbk.github.io/json_to_dart/
.基础结构
横向ListView 与Listview代码抽离
ListView动态填充数据
GridView demo
遇到的奇葩问题1:
org-dartlang-debug:synthetic_debug_expression:1:1: Error: String starting with ' must end with '.
'Unable to load asset: $key
解决办法:
--flutter clean
遇到的奇葩问题2:
Another exception was thrown: Exception: HTTP request failed, statusCode: 403
定位后发现,是后台接口token校验问题,
遇到的奇葩问题3
android 运行一直卡住 无法安装
解决办法
修改build.gradle,把里面的google()、jcenter()注释掉,因为要访问外网,改成aliyun代理网址
然后,还有把gradle-wrapper.properties文件内gradle-4.10.x-all.zip 改成本地有的版本(必须是4.6 or 更新版)
自定义控件 + 传参定义
遇到的奇葩问题4
Waiting for another flutter command to release the startup lock…
https://github.com/flutter/flutter/issues/17422
On OSX:
rm /Applications/flutter/bin/cache/lockfile
Waiting for another flutter command to release the startup lock…
flutter packages get --verbose
遇到的奇葩问题 页面路由跳转
Navigator operation requested with a context that does not include a Navigator.
The context used to push or pop routes from the Navigator must be that of a widget that is a descendant of a Navigator widget.
直接在MyApp中push是不行的。启动的时候 要包一层
[图片上传失败...(image-4b8271-1554889682077)]
Last updated
Was this helpful?