Make stocksapp.dart almost pass the dart analyzer.

To test:
sky/tools/shelldb analyze sky/examples/stocks-fn/stocksapp.dart

It prints 600+ warnings about the "native" keyword, and after
this change only a couple warnings about missing library names
which I don't fully understand.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/987613002
This commit is contained in:
Eric Seidel
2015-03-05 16:52:14 -08:00
parent 760a6502e0
commit 2a9c2c40bf
3 changed files with 6 additions and 8 deletions

View File

@@ -106,22 +106,22 @@ abstract class FixedHeightScrollable extends Component {
_scheduleFlingUpdate();
}
void _handleScrollUpdate(sky.Event event) {
void _handleScrollUpdate(sky.GestureEvent event) {
_scrollBy(-event.dy);
}
void _handleFlingStart(sky.Event event) {
void _handleFlingStart(sky.GestureEvent event) {
setState(() {
_flingCurve = new FlingCurve(-event.velocityY, event.timeStamp);
_scheduleFlingUpdate();
});
}
void _handleFlingCancel(sky.Event event) {
void _handleFlingCancel(sky.GestureEvent event) {
_stopFling();
}
void _handleWheel(sky.Event event) {
void _handleWheel(sky.WheelEvent event) {
_scrollBy(-event.offsetY);
}
}

View File

@@ -33,9 +33,9 @@ abstract class MaterialComponent extends Component {
..events.listen('pointerdown', _startSplash);
}
sky.ClientRect _getBoundingRect() => getRoot().getBoundingClientRect();
sky.ClientRect _getBoundingRect() => (getRoot() as sky.Element).getBoundingClientRect();
void _startSplash(sky.Event event) {
void _startSplash(sky.PointerEvent event) {
setState(() {
if (_splashes == null) {
_splashes = new LinkedHashSet<SplashAnimation>();

View File

@@ -3,9 +3,7 @@ library stocksapp;
import '../../framework/fn.dart';
import '../data/stocks.dart';
import '../fn/widgets/widgets.dart';
import 'dart:collection';
import 'dart:math';
import 'dart:sky' as sky;
part 'stockarrow.dart';
part 'stocklist.dart';