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

Unified Diff: sky/sdk/lib/framework/components2/scaffold.dart

Issue 1154013006: Fix Dart analyzer warnings in scaffold.dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | sky/sdk/lib/framework/rendering/render_flex.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/components2/scaffold.dart
diff --git a/sky/sdk/lib/framework/components2/scaffold.dart b/sky/sdk/lib/framework/components2/scaffold.dart
index 8d32bf0b91c8fc3061b90c76d3135c3c0eb15a3e..79b641b65ba4034a69182b3663e824dfa57a656f 100644
--- a/sky/sdk/lib/framework/components2/scaffold.dart
+++ b/sky/sdk/lib/framework/components2/scaffold.dart
@@ -5,18 +5,19 @@
import '../fn2.dart';
import '../theme/typography.dart' as typography;
import 'dart:sky' as sky;
+import '../rendering/render_box.dart';
+import '../rendering/render_node.dart';
// RenderNode
-class RenderScaffold extends RenderDecoratedBox {
+class RenderScaffold extends RenderBox {
RenderScaffold({
- BoxDecoration decoration,
RenderBox toolbar,
RenderBox body,
RenderBox statusbar,
RenderBox drawer,
RenderBox floatingActionButton
- }) : super(decoration) {
+ }) {
this.toolbar = toolbar;
this.body = body;
this.statusbar = statusbar;
@@ -120,7 +121,7 @@ class RenderScaffold extends RenderDecoratedBox {
if (floatingActionButton != null) {
floatingActionButton.layout(new BoxConstraints(minWidth: 0.0, maxWidth: size.width, minHeight: size.height, maxHeight: size.height));
assert(floatingActionButton.parentData is BoxParentData);
- floatingActionButton.parentData.position = new sky.Point(size.width - xButtonX, bodyPosition + bodyHeight - kButtonY);
+ floatingActionButton.parentData.position = new sky.Point(size.width - kButtonX, bodyPosition + bodyHeight - kButtonY);
}
}
@@ -140,7 +141,7 @@ class RenderScaffold extends RenderDecoratedBox {
void hitTestChildren(HitTestResult result, { sky.Point position }) {
assert(floatingActionButton == null || floatingActionButton.parentData is BoxParentData);
assert(statusbar == null || statusbar.parentData is BoxParentData);
- if ((drawer != null) && (x < drawer.size.width)) {
+ if ((drawer != null) && (position.x < drawer.size.width)) {
drawer.hitTest(result, position: position);
} else if ((floatingActionButton != null) && (position.x >= floatingActionButton.parentData.position.x) && (position.x < floatingActionButton.parentData.position.x + floatingActionButton.size.width)
&& (position.y >= floatingActionButton.parentData.position.y) && (position.y < floatingActionButton.parentData.position.y + floatingActionButton.size.height)) {
« no previous file with comments | « no previous file | sky/sdk/lib/framework/rendering/render_flex.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698