|
|
|
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using Unity.UIWidgets.async; |
|
|
|
using Unity.UIWidgets.async2; |
|
|
|
using Unity.UIWidgets.foundation; |
|
|
|
using Unity.UIWidgets.ui; |
|
|
|
|
|
|
|
|
|
|
class _CountdownZoned { |
|
|
|
public _CountdownZoned(TimeSpan duration) { |
|
|
|
D.assert(duration != null); |
|
|
|
_timer = Window.instance.run(duration, _onTimeout); |
|
|
|
_timer = Timer.create(duration, _onTimeout); |
|
|
|
} |
|
|
|
|
|
|
|
public bool _timeout = false; |
|
|
|
|
|
|
void _startDoubleTapTimer() { |
|
|
|
_doubleTapTimer = |
|
|
|
_doubleTapTimer |
|
|
|
?? Window.instance.run(Constants.kDoubleTapTimeout, _reset); |
|
|
|
?? Timer.create(Constants.kDoubleTapTimeout, _reset); |
|
|
|
} |
|
|
|
|
|
|
|
void _stopDoubleTapTimer() { |
|
|
|
|
|
|
_lastPosition = OffsetPair.fromEventPosition(evt); |
|
|
|
startTrackingPointer(handleEvent, evt.transform); |
|
|
|
if (longTapDelay > TimeSpan.Zero) { |
|
|
|
_timer = Window.instance.run(longTapDelay, () => { |
|
|
|
_timer = Timer.create(longTapDelay, () => { |
|
|
|
_timer = null; |
|
|
|
this.gestureRecognizer._dispatchLongTap(evt.pointer, _lastPosition); |
|
|
|
}); |
|
|
|