Move Drawer to GestureDetector
This fixes an issue in the stocks app in horizontal mode where you could both scroll and drag the drawer at the same time.
This commit is contained in:
@@ -53,14 +53,14 @@ void main() {
|
||||
router.route(pointer.move(new Point(20.0, 20.0)));
|
||||
expect(didStartPan, isTrue);
|
||||
didStartPan = false;
|
||||
expect(updatedScrollDelta, new sky.Offset(10.0, -10.0));
|
||||
expect(updatedScrollDelta, new sky.Offset(10.0, 10.0));
|
||||
updatedScrollDelta = null;
|
||||
expect(didEndPan, isFalse);
|
||||
expect(didTap, isFalse);
|
||||
|
||||
router.route(pointer.move(new Point(20.0, 25.0)));
|
||||
expect(didStartPan, isFalse);
|
||||
expect(updatedScrollDelta, new sky.Offset(0.0, -5.0));
|
||||
expect(updatedScrollDelta, new sky.Offset(0.0, 5.0));
|
||||
updatedScrollDelta = null;
|
||||
expect(didEndPan, isFalse);
|
||||
expect(didTap, isFalse);
|
||||
|
||||
@@ -43,7 +43,7 @@ void main() {
|
||||
Point secondLocation = new Point(10.0, 9.0);
|
||||
tester.dispatchEvent(pointer.move(secondLocation), firstLocation);
|
||||
expect(didStartDrag, isFalse);
|
||||
expect(updatedDragDelta, 1.0);
|
||||
expect(updatedDragDelta, -1.0);
|
||||
updatedDragDelta = null;
|
||||
expect(didEndDrag, isFalse);
|
||||
|
||||
@@ -86,6 +86,6 @@ void main() {
|
||||
tester.dispatchEvent(pointer.up(), downLocation);
|
||||
|
||||
expect(gestureCount, 2);
|
||||
expect(dragDistance, -20.0);
|
||||
expect(dragDistance, 20.0);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user