提交 4806a4cc 编写于 作者: A Adam Barth

Remove _emptyList from fn2.dart

We can use const [] instead and we'll be sure we don't mutate this constant.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1178623002.
上级 633ba8c8
......@@ -530,8 +530,6 @@ class CustomPaint extends OneChildRenderObjectWrapper {
}
final List<UINode> _emptyList = new List<UINode>();
abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper {
// In MultiChildRenderObjectWrapper subclasses, slots are RenderObject nodes
......@@ -540,10 +538,8 @@ abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper {
MultiChildRenderObjectWrapper({
Object key,
List<UINode> children
}) : this.children = children == null ? _emptyList : children,
super(
key: key
) {
}) : this.children = children == null ? const [] : children,
super(key: key) {
assert(!_debugHasDuplicateIds());
}
......
......@@ -51,8 +51,7 @@ same order (unless the order matters).
All variables and arguments are typed; don't use "var", "dynamic", or
"Object" in any case where you could figure out the actual type.
Always specialise generic types where possible. Even for ```[]``` and
```{}``` literals, include the types.
Always specialise generic types where possible.
Aim for a line length of 80 characters, but go over if breaking the
line would make it less readable.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册