prefer const constructors (#8316)
This commit is contained in:
committed by
Adam Barth
parent
663862557b
commit
e9a775bf38
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user