doubleTap method
Taps target twice in the same place, close enough together to read as
one gesture — what onDoubleTap waits for.
The taps are gap of the fake clock apart, 80ms unless it says
otherwise, and the gap is not free to be zero. A
DoubleTapGestureRecognizer restarts rather than fires when the second
tap arrives inside kDoubleTapMinTime (40ms), and gives the pair up past
kDoubleTapTimeout (300ms), so two taps with no time between them do
nothing at all. Both land where the first one aimed: re-reading the
centre would follow a widget the first tap moved, out of the slop the
second has to land in.
Implementation
Future<void> doubleTap(
dynamic target, {
Duration? gap,
Shot? shot,
Settle? settle,
}) => _step(
shot,
settle,
() async {
var finder = await _resolve(target, 'doubleTap');
var at = _aimFor(target, finder);
await _approach('doubleTap');
await _pressAt(at, over: describeTarget(target));
await _elapse(gap ?? _doubleTapGap);
await _pressAt(at, over: describeTarget(target));
},
verb: 'doubleTap',
target: describeTarget(target),
);