【发布时间】:2021-01-12 10:54:46
【问题描述】:
我需要显示容器中的颜色。意思是我有字符串格式的颜色代码,我需要用作容器颜色。
decoration: BoxDecoration(
color: widget.product.colors[i].toColor(),
borderRadius: BorderRadius.all(Radius.circular(40)),
这是我正在做的简单代码,但显示错误
Invalid argument(s): Can not interpret string 0xFFF6625E
如果我删除 .toColor() 那么它的显示
Error: The argument type 'String' can't be assigned to the parameter type 'Color'.
谁能告诉我如何显示这个?
【问题讨论】:
标签: flutter