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/material.dart';
import 'package:flutter/painting.dart';
@@ -299,7 +299,7 @@ class CardCollectionState extends State<CardCollection> {
});
}
sky.Shader _createShader(Rect bounds) {
ui.Shader _createShader(Rect bounds) {
return new LinearGradient(
begin: Point.origin,
end: new Point(0.0, bounds.height),

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/material.dart';
import 'package:flutter/rendering.dart';
@@ -31,14 +31,14 @@ class Marker extends StatelessComponent {
final double size;
final MarkerType type;
void paintMarker(sky.Canvas canvas, _) {
void paintMarker(ui.Canvas canvas, _) {
Paint paint = new Paint()..color = const Color(0x8000FF00);
paint.setStyle(sky.PaintingStyle.fill);
paint.setStyle(ui.PaintingStyle.fill);
double r = size / 2.0;
canvas.drawCircle(new Point(r, r), r, paint);
paint.color = const Color(0xFFFFFFFF);
paint.setStyle(sky.PaintingStyle.stroke);
paint.setStyle(ui.PaintingStyle.stroke);
paint.strokeWidth = 1.0;
if (type == MarkerType.topLeft) {
canvas.drawLine(new Point(r, r), new Point(r + r - 1.0, r), paint);
@@ -103,7 +103,7 @@ class OverlayGeometryAppState extends State<OverlayGeometryApp> {
});
}
void handlePointerDown(GlobalKey target, sky.PointerEvent event) {
void handlePointerDown(GlobalKey target, ui.PointerEvent event) {
setState(() {
markers[MarkerType.touch] = new Point(event.x, event.y);
final RenderBox box = target.currentContext.findRenderObject();

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/animation.dart';
import 'package:flutter/material.dart';
@@ -11,7 +11,7 @@ import 'package:flutter/rendering.dart';
import '../rendering/solid_color_box.dart';
// Solid colour, RenderObject version
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;
@@ -81,9 +81,9 @@ void main() {
new RenderBoxToWidgetAdapter(proxy, builder); // adds itself to proxy
RenderFlex flexRoot = new RenderFlex(direction: FlexDirection.vertical);
addFlexChildSolidColor(flexRoot, const sky.Color(0xFFFF00FF), flex: 1);
addFlexChildSolidColor(flexRoot, const ui.Color(0xFFFF00FF), flex: 1);
flexRoot.add(proxy);
addFlexChildSolidColor(flexRoot, const sky.Color(0xFF0000FF), flex: 1);
addFlexChildSolidColor(flexRoot, const ui.Color(0xFF0000FF), flex: 1);
transformBox = new RenderTransform(child: flexRoot, transform: new Matrix4.identity());
RenderPadding root = new RenderPadding(padding: new EdgeDims.all(80.0), child: transformBox);