Reverts "Reland VelocityTracker update (#132291)" (#138512)

Reverts flutter/flutter#137381
Initiated by: Piinks
This change reverts the following previous change:
Original Description:
This updates the implementation to use the stopwatch from the Clock object and piping it through to the TestWidgetsFlutterBinding so it will be kept in sync with FakeAsync.

Relands #132291
Fixes https://github.com/flutter/flutter/issues/97761

The change was reverted due to flakiness it introduced in tests that use fling gestures.
* https://github.com/flutter/flutter/issues/135728
This commit is contained in:
auto-submit[bot]
2023-11-15 21:22:19 +00:00
committed by GitHub
parent 465288588f
commit 82a7a62b45
7 changed files with 43 additions and 140 deletions

View File

@@ -425,9 +425,6 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
/// actual current wall-clock time.
Clock get clock;
@override
SamplingClock? get debugSamplingClock => _TestSamplingClock(clock);
/// Triggers a frame sequence (build/layout/paint/etc),
/// then flushes microtasks.
///
@@ -2152,18 +2149,6 @@ class TestViewConfiguration extends ViewConfiguration {
String toString() => 'TestViewConfiguration';
}
class _TestSamplingClock implements SamplingClock {
_TestSamplingClock(this._clock);
@override
DateTime now() => _clock.now();
@override
Stopwatch stopwatch() => _clock.stopwatch();
final Clock _clock;
}
const int _kPointerDecay = -2;
class _LiveTestPointerRecord {