Unnecessary new (#20138)

* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
This commit is contained in:
Alexandre Ardhuin
2018-09-12 08:29:29 +02:00
committed by GitHub
parent d7a0dcaa4a
commit d927c93310
1285 changed files with 26519 additions and 26519 deletions

View File

@@ -51,7 +51,7 @@ class AndroidSemanticsNode {
/// ]
/// }
factory AndroidSemanticsNode.deserialize(String value) {
return new AndroidSemanticsNode._(json.decode(value));
return AndroidSemanticsNode._(json.decode(value));
}
final Map<String, Object> _values;
@@ -129,7 +129,7 @@ class AndroidSemanticsNode {
Rect getRect() {
final Map<String, Object> rawRect = _values['rect'];
final Map<String, int> rect = rawRect.cast<String, int>();
return new Rect.fromLTRB(
return Rect.fromLTRB(
rect['left'].toDouble(),
rect['top'].toDouble(),
rect['right'].toDouble(),
@@ -140,7 +140,7 @@ class AndroidSemanticsNode {
/// Gets a [Size] which defines the size of the semantics node.
Size getSize() {
final Rect rect = getRect();
return new Size(rect.bottom - rect.top, rect.right - rect.left);
return Size(rect.bottom - rect.top, rect.right - rect.left);
}
/// Gets a list of [AndroidSemanticsActions] which are defined for the node.