未验证 提交 3b75979d 编写于 作者: D Dan Field 提交者: GitHub

fix ColorFilter.matrix constness (#9789)

上级 3c9a22c7
......@@ -2501,7 +2501,6 @@ class ColorFilter {
/// unnormalized, 0...255, space.
const ColorFilter.matrix(List<double> matrix)
: assert(matrix != null, 'Color Matrix argument was null.'),
assert(matrix.length == 20, 'Color Matrix must have 20 entries.'),
_color = null,
_blendMode = null,
_matrix = matrix,
......@@ -2558,6 +2557,7 @@ class ColorFilter {
case _TypeMode:
return _ColorFilter.mode(this);
case _TypeMatrix:
assert(_matrix.length == 20, 'Color Matrix must have 20 entries.');
return _ColorFilter.matrix(this);
case _TypeLinearToSrgbGamma:
return _ColorFilter.linearToSrgbGamma(this);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册