flutter Cannot provide both a color and a decoration

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 color and a decoration)