Commit 2a9c2c40 authored by Eric Seidel's avatar Eric Seidel

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
parent 760a6502
......@@ -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);
}
}
......@@ -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>();
......
......@@ -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';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment