美文网首页
flutter Cannot provide both a co

flutter Cannot provide both a co

作者: xiaotimel | 来源:发表于2021-01-14 18:31 被阅读0次

flutter布局错误
'package:flutter/src/widgets/container .dart' :
Failed assertion: line 285 pos 15 : 'color == null || decoration == null ':
Cannot provide both a color and a decoration
To provide both, use "decoration : BoxDecoration(color:color)",

布局中不能同时使用decoration和color,把外层的color放到decoration中就OK了。

相关文章

网友评论

      本文标题:flutter Cannot provide both a co

      本文链接:https://www.haomeiwen.com/subject/fxavaktx.html