From b8953a4bbca81f57067273dcce37394008a7e4a5 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 28 May 2015 16:55:09 -0700 Subject: [PATCH] Fix Dart analyzer warnings in scaffold.dart TBR=ianh@google.com Review URL: https://codereview.chromium.org/1154013006 --- sdk/lib/framework/components2/scaffold.dart | 11 ++++++----- sdk/lib/framework/rendering/render_flex.dart | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/lib/framework/components2/scaffold.dart b/sdk/lib/framework/components2/scaffold.dart index 8d32bf0b91..79b641b65b 100644 --- a/sdk/lib/framework/components2/scaffold.dart +++ b/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)) { diff --git a/sdk/lib/framework/rendering/render_flex.dart b/sdk/lib/framework/rendering/render_flex.dart index 9e9d8ed0ad..5ef24fdf98 100644 --- a/sdk/lib/framework/rendering/render_flex.dart +++ b/sdk/lib/framework/rendering/render_flex.dart @@ -3,7 +3,6 @@ // found in the LICENSE file. import 'dart:sky' as sky; -import 'render_node.dart'; import 'render_box.dart'; import 'render_node.dart'; -- GitLab