Flutter开发学习过程

Flutter开发成长过程记录

目录

这是一篇记录flutter开发成长过程的博文。主要记录学习过程中看到的容易坑的点

2020年7月4日

阅读了flutter官方开发文档。
最近开始重视软件等学习过程中阅读开发文档了,因为开发文档是最规范、最权威的参考文件,读好开发文档才能对原理和整体框架更加熟悉,开发起来才会得心应手。
今日排雷:

  1. 使用key来解决ststeful widget位置交换等情形时的问题
  2. 设置Expanded的参数fit: BoxFit.contain来解决Expanded所包含内容(图片或图标)过小的问题
  3. 如果在使用row时出现overflow,用Expanded()来包装过于长的内容。
  4. 如果在使用column时出现overflow,应该改用ListView
  5. 在使用column时提示“unbounded vertical constraints.”的运行时错误,有两种原因:第一种是列嵌套列,此时应给内部列加上Sxpanded或Flexible;第二种是ListView等嵌套列,此时应删去内部列的Expanded或Flexble(因为ListView等是提供了无限空间给item的)。

2020年7月5日

  1. 为text设置overflow: TextOverflow.ellipsis,参数,让过长的text省略显示
  2. Use raised buttons to add dimension to otherwise mostly flat layouts, e.g. in long busy lists of content, or in wide spaces. Avoid using raised buttons on already-raised content such as dialogs or cards.If onPressed and onLongPress callbacks are null, then the button will be disabled and by default will resemble a flat button in the disabledColor. If you are trying to change the button’s color and it is not having any effect, check that you are passing a non-null onPressed or onLongPress callbacks.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值