TextVirtualNode constructor
TextVirtualNode(
- dynamic rootId,
- dynamic id,
- dynamic pid,
- dynamic index,
- dynamic renderContext,
Implementation
TextVirtualNode(rootId, id, pid, index, renderContext)
: super(rootId, id, pid, index, renderContext) {
if (parent != null) {
_tapGestureRecognizer = TapGestureRecognizer();
_tapGestureRecognizer?.onTapDown = (detail) {
_longClickTimer = Timer(const Duration(milliseconds: 500), () {
nativeGestureDispatcher.handleLongClick();
});
nativeGestureDispatcher.handlePressIn();
};
_tapGestureRecognizer?.onTapUp = (e) {
var longClickTimer = _longClickTimer;
if (longClickTimer != null && longClickTimer.isActive) {
nativeGestureDispatcher.handleClick();
longClickTimer.cancel();
}
nativeGestureDispatcher.handlePressOut();
};
}
}