Convert PointerInputEvent to Duration for timestamp

To make the units clear.
This commit is contained in:
Adam Barth
2015-11-17 11:07:50 -08:00
parent 7ad947ac66
commit 7b2004b0e9
6 changed files with 26 additions and 33 deletions

View File

@@ -11,7 +11,7 @@ class TestPointer {
bool isDown = false;
ui.Point location;
PointerInputEvent down(ui.Point newLocation, { double timeStamp: 0.0 }) {
PointerInputEvent down(ui.Point newLocation, { Duration timeStamp: const Duration() }) {
assert(!isDown);
isDown = true;
location = newLocation;
@@ -24,7 +24,7 @@ class TestPointer {
);
}
PointerInputEvent move(ui.Point newLocation, { double timeStamp: 0.0 }) {
PointerInputEvent move(ui.Point newLocation, { Duration timeStamp: const Duration() }) {
assert(isDown);
ui.Offset delta = newLocation - location;
location = newLocation;
@@ -39,7 +39,7 @@ class TestPointer {
);
}
PointerInputEvent up({ double timeStamp: 0.0 }) {
PointerInputEvent up({ Duration timeStamp: const Duration() }) {
assert(isDown);
isDown = false;
return new PointerInputEvent(
@@ -51,7 +51,7 @@ class TestPointer {
);
}
PointerInputEvent cancel({ double timeStamp: 0.0 }) {
PointerInputEvent cancel({ Duration timeStamp: const Duration() }) {
assert(isDown);
isDown = false;
return new PointerInputEvent(