<p dir="auto">The api for tesitng with pointer events looks something like this:</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Point start = new Point(...);
Point end = new Point(...);
tester.dispatchEvent(pointer.down(start), start);
tester.pump();
tester.dispatchEvent(pointer.move(end), start);
tester.pump();
tester.dispatchEvent(pointer.up(), start);
tester.pump();"><pre class="notranslate"><span class="pl-c1">Point</span> start <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">Point</span>(...);
<span class="pl-c1">Point</span> end <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">Point</span>(...);
tester.<span class="pl-en">dispatchEvent</span>(pointer.<span class="pl-en">down</span>(start), start);
tester.<span class="pl-en">pump</span>();
tester.<span class="pl-en">dispatchEvent</span>(pointer.<span class="pl-en">move</span>(end), start);
tester.<span class="pl-en">pump</span>();
tester.<span class="pl-en">dispatchEvent</span>(pointer.<span class="pl-en">up</span>(), start);
tester.<span class="pl-en">pump</span>();</pre></div>
<p dir="auto">The fact you need to pass your starting point for all of the events - especially after having moved the pointer - is weird.</p>
<p dir="auto">Driving a pointer in a test right now requires pumping, continually giving the original location, etc.</p>
<p dir="auto">Instead the API should look something like:</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="TestGesture gesture = tester.startGesture(downLocation);
gesture.moveTo(newPoint1);
gesture.moveTo(newPoint2);
gesture.moveTo(newPoint3);
gesture.up(); // or gesture.cancel();"><pre class="notranslate"><span class="pl-c1">TestGesture</span> gesture <span class="pl-k">=</span> tester.<span class="pl-en">startGesture</span>(downLocation);
gesture.<span class="pl-en">moveTo</span>(newPoint1);
gesture.<span class="pl-en">moveTo</span>(newPoint2);
gesture.<span class="pl-en">moveTo</span>(newPoint3);
gesture.<span class="pl-en">up</span>(); <span class="pl-c">// or gesture.cancel();</span></pre></div>
<p dir="auto">moveTo would dispatch a pointer move event with the new point, at downLocation, then pump.</p>
<p dir="auto">gesture would also expose the TestPointer.</p>
<p dir="auto">moveTo() would take optional argument "pump: false" or maybe "duration" which is how long to pump (and null would mean don't pump).</p>