Convert PointerInputEvent to Duration for timestamp
To make the units clear.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user