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 'dart:math' as math;
import 'package:flutter/services.dart';
@@ -19,7 +19,7 @@ class Touch {
class RenderImageGrow extends RenderImage {
final Size _startingSize;
RenderImageGrow(sky.Image image, Size size)
RenderImageGrow(ui.Image image, Size size)
: _startingSize = size, super(image: image, width: size.width, height: size.height);
double _growth = 0.0;
@@ -35,7 +35,7 @@ RenderImageGrow image;
Map<int, Touch> touches = new Map();
void handleEvent(event) {
if (event is sky.PointerEvent) {
if (event is ui.PointerEvent) {
if (event.type == 'pointermove')
image.growth = math.max(0.0, image.growth + event.x - touches[event.pointer].x);
touches[event.pointer] = new Touch(event.x, event.y);
@@ -59,7 +59,7 @@ void main() {
// Resizeable image
image = new RenderImageGrow(null, new Size(100.0, null));
imageCache.load("https://www.dartlang.org/logos/dart-logo.png").first.then((sky.Image dartLogo) {
imageCache.load("https://www.dartlang.org/logos/dart-logo.png").first.then((ui.Image dartLogo) {
image.image = dartLogo;
});
@@ -99,5 +99,5 @@ Pancetta meatball tongue tenderloin rump tail jowl boudin.""";
updateTaskDescription('Interactive Flex', topColor);
new FlutterBinding(root: root);
sky.view.setEventCallback(handleEvent);
ui.view.setEventCallback(handleEvent);
}