Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1762)

Unified Diff: sky/sdk/example/rendering/solid_color_box.dart

Issue 1226113007: Add @override annotation to known overriden methods (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/example/rendering/simple_autolayout.dart ('k') | sky/sdk/example/rendering/touch_demo.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/example/rendering/solid_color_box.dart
diff --git a/sky/sdk/example/rendering/solid_color_box.dart b/sky/sdk/example/rendering/solid_color_box.dart
index b6624c666fbb353de51c00d3be1098271d912447..3ce9ef3e6f0fae1a51cfea0808201314a9e88162 100644
--- a/sky/sdk/example/rendering/solid_color_box.dart
+++ b/sky/sdk/example/rendering/solid_color_box.dart
@@ -14,34 +14,40 @@ class RenderSolidColorBox extends RenderDecoratedBox {
: backgroundColor = backgroundColor,
super(decoration: new BoxDecoration(backgroundColor: backgroundColor));
+ @override
double getMinIntrinsicWidth(BoxConstraints constraints) {
return constraints.constrainHeight(
this.desiredSize == Size.infinite ? 0.0 : desiredSize.width
);
}
+ @override
double getMaxIntrinsicWidth(BoxConstraints constraints) {
return constraints.constrainWidth(
this.desiredSize == Size.infinite ? 0.0 : desiredSize.width
);
}
+ @override
double getMinIntrinsicHeight(BoxConstraints constraints) {
return constraints.constrainHeight(
this.desiredSize == Size.infinite ? 0.0 : desiredSize.height
);
}
+ @override
double getMaxIntrinsicHeight(BoxConstraints constraints) {
return constraints.constrainHeight(
this.desiredSize == Size.infinite ? 0.0 : desiredSize.height
);
}
+ @override
void performLayout() {
size = constraints.constrain(desiredSize);
}
+ @override
void handleEvent(sky.Event event, BoxHitTestEntry entry) {
if (event.type == 'pointerdown')
decoration = new BoxDecoration(backgroundColor: const Color(0xFFFF0000));
« no previous file with comments | « sky/sdk/example/rendering/simple_autolayout.dart ('k') | sky/sdk/example/rendering/touch_demo.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698