![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
flutter
_花开富贵
这个作者很懒,什么都没留下…
展开
-
flutter The argument type ‘String?‘ can‘t be assigned to the parameter type ‘String‘.
The argument type 'String?' can't be assigned to the parameter type 'String'.Change the return type of statusCode to String and provide a default value.String get statusCode => statusCodes[this] ?? '';When accessing a map, there is a chance that yo原创 2022-01-05 19:48:25 · 7415 阅读 · 0 评论 -
flutter 设置Text居左无效
Text不管设置啥都是居中,Text组件设置textAlign: TextAlign.left无效。后来发现是由于TEXT组件的大小是自动包裹内容的,所以怎么设置都不会看到效果,因为没有多余的空间去左对齐或右对齐等。但是这里Text组件放在Colum组件中,所以只需要对Colum设置crossAxisAlignment: CrossAxisAlignment.start即可生效...原创 2022-01-05 19:43:20 · 2793 阅读 · 0 评论 -
flutter ‘package:flutter/src/widgets/container.dart‘: Failed assertion: line 274 pos 15: ‘color == n
异常:'package:flutter/src/widgets/container.dart':Failed assertion: line 274 pos 15: 'color == null || decoration == null'解决方案:container 这个容器组件中 color 和decoration两个属性不能同时存在。原创 2022-01-04 15:09:03 · 2050 阅读 · 0 评论