Let iOS have a minimum scroll movement threshold to break before motion starts (#13166)

* Add a minimum distance that needs breaking on iOS each time scrolls stopped.

* Testing and tests

* tweak docs

* review
This commit is contained in:
xster
2017-11-30 11:11:52 -08:00
committed by GitHub
parent 42ca92c756
commit 738e62cb2e
5 changed files with 163 additions and 15 deletions

View File

@@ -163,16 +163,16 @@ class TestGesture {
final TestPointer _pointer;
/// Send a move event moving the pointer by the given offset.
Future<Null> moveBy(Offset offset) {
Future<Null> moveBy(Offset offset, { Duration timeStamp: Duration.ZERO }) {
assert(_pointer._isDown);
return moveTo(_pointer.location + offset);
return moveTo(_pointer.location + offset, timeStamp: timeStamp);
}
/// Send a move event moving the pointer to the given location.
Future<Null> moveTo(Offset location) {
Future<Null> moveTo(Offset location, { Duration timeStamp: Duration.ZERO }) {
return TestAsyncUtils.guard(() {
assert(_pointer._isDown);
return _dispatcher(_pointer.move(location), _result);
return _dispatcher(_pointer.move(location, timeStamp: timeStamp), _result);
});
}