prefer const constructors (#8316)

This commit is contained in:
Alexandre Ardhuin
2017-02-21 23:54:29 +01:00
committed by Adam Barth
parent 663862557b
commit e9a775bf38
43 changed files with 145 additions and 145 deletions

View File

@@ -572,7 +572,7 @@ class RenderSolidColor extends RenderDecoratedSector {
@override
void handleEvent(PointerEvent event, HitTestEntry entry) {
if (event is PointerDownEvent) {
decoration = new BoxDecoration(backgroundColor: const Color(0xFFFF0000));
decoration = const BoxDecoration(backgroundColor: const Color(0xFFFF0000));
} else if (event is PointerUpEvent) {
decoration = new BoxDecoration(backgroundColor: backgroundColor);
}

View File

@@ -41,7 +41,7 @@ class RenderSolidColorBox extends RenderDecoratedBox {
@override
void handleEvent(PointerEvent event, BoxHitTestEntry entry) {
if (event is PointerDownEvent) {
decoration = new BoxDecoration(backgroundColor: const Color(0xFFFF0000));
decoration = const BoxDecoration(backgroundColor: const Color(0xFFFF0000));
} else if (event is PointerUpEvent) {
decoration = new BoxDecoration(backgroundColor: backgroundColor);
}