Import dart:ui as ui (instead of as sky)

This commit is contained in:
Adam Barth
2015-10-09 20:55:54 -07:00
parent 65eba90843
commit ecce1eb389
100 changed files with 737 additions and 737 deletions

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as sky;
import 'dart:ui' as ui;
import 'package:flutter/rendering.dart';
import 'solid_color_box.dart';
@@ -11,24 +11,24 @@ RenderBox buildFlexExample() {
RenderFlex flexRoot = new RenderFlex(direction: FlexDirection.vertical);
RenderDecoratedBox root = new RenderDecoratedBox(
decoration: new BoxDecoration(backgroundColor: const sky.Color(0xFF000000)),
decoration: new BoxDecoration(backgroundColor: const ui.Color(0xFF000000)),
child: flexRoot
);
void addFlexChildSolidColor(RenderFlex parent, sky.Color backgroundColor, { int flex: 0 }) {
void addFlexChildSolidColor(RenderFlex parent, ui.Color backgroundColor, { int flex: 0 }) {
RenderSolidColorBox child = new RenderSolidColorBox(backgroundColor);
parent.add(child);
child.parentData.flex = flex;
}
// Yellow bar at top
addFlexChildSolidColor(flexRoot, const sky.Color(0xFFFFFF00), flex: 1);
addFlexChildSolidColor(flexRoot, const ui.Color(0xFFFFFF00), flex: 1);
// Turquoise box
flexRoot.add(new RenderSolidColorBox(const sky.Color(0x7700FFFF), desiredSize: new sky.Size(100.0, 100.0)));
flexRoot.add(new RenderSolidColorBox(const ui.Color(0x7700FFFF), desiredSize: new ui.Size(100.0, 100.0)));
var renderDecoratedBlock = new RenderDecoratedBox(
decoration: new BoxDecoration(backgroundColor: const sky.Color(0xFFFFFFFF))
decoration: new BoxDecoration(backgroundColor: const ui.Color(0xFFFFFFFF))
);
flexRoot.add(new RenderPadding(padding: const EdgeDims.all(10.0), child: renderDecoratedBlock));
@@ -36,11 +36,11 @@ RenderBox buildFlexExample() {
var row = new RenderFlex(direction: FlexDirection.horizontal);
// Purple and blue cells
addFlexChildSolidColor(row, const sky.Color(0x77FF00FF), flex: 1);
addFlexChildSolidColor(row, const sky.Color(0xFF0000FF), flex: 2);
addFlexChildSolidColor(row, const ui.Color(0x77FF00FF), flex: 1);
addFlexChildSolidColor(row, const ui.Color(0xFF0000FF), flex: 2);
var decoratedRow = new RenderDecoratedBox(
decoration: new BoxDecoration(backgroundColor: const sky.Color(0xFF333333)),
decoration: new BoxDecoration(backgroundColor: const ui.Color(0xFF333333)),
child: row
);