void _startSplash(TapDownDetails details = null, BuildContext context = null) { D.assert(details != null || context != null); Offset globalPosition; if (context != null) { RenderBox referenceBox = context.findRenderObject() as RenderBox; D.assert(referenceBox.hasSize, () => "InkResponse must be done with layout before starting a splash."); globalPosition = referenceBox.localToGlobal(referenceBox.paintBounds.center); } else { globalPosition = details.globalPosition; } InteractiveInkFeature splash = _createInkFeature(globalPosition); _splashes = _splashes ?? new HashSet <InteractiveInkFeature>(); _splashes.Add(splash); _currentSplash = splash; updateKeepAlive(); updateHighlight(_HighlightType.pressed, value: true); }
void _handleTapDown(TapDownDetails details) { if (this.isInteractive) { this._reactionController.forward(); } }
public void _onTapDown(TapDownDetails details) { setState(() => { _childHidden = true; }); Rect childRect = CupertinoContextMenuUtils._getRect(_childGlobalKey); _decoyChildEndRect = CupertinoContextMenuUtils.fromCenter( center: childRect.center, width: childRect.width * CupertinoContextMenuUtils._kOpenScale, height: childRect.height * CupertinoContextMenuUtils._kOpenScale ); _lastOverlayEntry = new OverlayEntry( opaque: false, builder: (BuildContext context) => { return(new _DecoyChild( beginRect: childRect, child: widget.child, controller: _openController, endRect: _decoyChildEndRect )); } ); Overlay.of(context).insert(_lastOverlayEntry); _openController.forward(); }
void _handleTapDown(TapDownDetails evt) { if (!_buttonHeldDown) { _buttonHeldDown = true; _animate(); } }
void _handleTapDown(TapDownDetails details) { _startSplash(details: details); if (widget.onTapDown != null) { widget.onTapDown(details); } }
void _checkPosition(TapDownDetails tapUpDetails) { setState(() => { _globalPostion = tapUpDetails.globalPosition; _localPostion = tapUpDetails.localPosition; }); }
void _handleDoubleTapDown(TapDownDetails details) { if (this.widget.selectionEnabled) { this._renderEditable.selectWord(cause: SelectionChangedCause.doubleTap); this._editableTextKey.currentState.showToolbar(); } }
void handleTapDown(TapDownDetails details) { this._lastTapDownPosition = details.globalPosition + -this._paintOffset; if (!Application.isMobilePlatform) { this.selectPosition(SelectionChangedCause.tap); } }
void _handleTapDown(TapDownDetails details) { if (this.isInteractive) { this._downPosition = this.globalToLocal(details.globalPosition); this._reactionController.forward(); } }
public void handleTapDown(TapDownDetails details) { this._lastTapDownPosition = details.globalPosition - this._paintOffset; if (!Application.isMobilePlatform) { this._selectForTap(this._lastTapDownPosition); } }
void _handleTapDown(TapDownDetails evt) { if (!this._buttonHeldDown) { this._buttonHeldDown = true; this._animate(); } }
void _handleTapDown(TapDownDetails details) { if (isInteractive) { needsPositionAnimation = false; } _reactionController.forward(); }
protected void onTapDown(TapDownDetails details) { renderEditable.handleTapDown(details); PointerDeviceKind?kind = details.kind; _shouldShowSelectionToolbar = kind == null || kind == PointerDeviceKind.touch || kind == PointerDeviceKind.stylus; }
void _startSplash(TapDownDetails details) { if (this._effectiveFocusNode.hasFocus) { return; } InteractiveInkFeature splash = this._createInkFeature(details); this._splashes = this._splashes ?? new HashSet <InteractiveInkFeature>(); this._splashes.Add(splash); this._currentSplash = splash; this.updateKeepAlive(); }
void _handleTapDown(TapDownDetails details) { InteractiveInkFeature splash = this._createInkFeature(details); this._splashes = this._splashes ?? new HashSet <InteractiveInkFeature>(); this._splashes.Add(splash); this._currentSplash = splash; if (this.widget.onTapDown != null) { this.widget.onTapDown(details); } this.updateKeepAlive(); this.updateHighlight(true); }
void _handleTapDown(TapDownDetails details) { if (this.widget.onTapDown != null) { this.widget.onTapDown(details); } if (this._doubleTapTimer != null && this._isWithinDoubleTapTolerance(details.globalPosition)) { if (this.widget.onDoubleTapDown != null) { this.widget.onDoubleTapDown(details); } this._doubleTapTimer.cancel(); this._doubleTapTimeout(); this._isDoubleTap = true; } }
InteractiveInkFeature _createInkFeature(TapDownDetails details) { MaterialInkController inkController = Material.of(this.context); RenderBox referenceBox = (RenderBox)this.context.findRenderObject(); Offset position = referenceBox.globalToLocal(details.globalPosition); Color color = this.widget.splashColor ?? Theme.of(this.context).splashColor; RectCallback rectCallback = this.widget.containedInkWell ? this.widget.getRectCallback(referenceBox) : null; BorderRadius borderRadius = this.widget.borderRadius; ShapeBorder customBorder = this.widget.customBorder; InteractiveInkFeature splash = null; void OnRemoved() { if (this._splashes != null) { D.assert(this._splashes.Contains(splash)); this._splashes.Remove(splash); if (this._currentSplash == splash) { this._currentSplash = null; } this.updateKeepAlive(); } } splash = (this.widget.splashFactory ?? Theme.of(this.context).splashFactory).create( controller: inkController, referenceBox: referenceBox, position: position, color: color, containedInkWell: this.widget.containedInkWell, rectCallback: rectCallback, radius: this.widget.radius, borderRadius: borderRadius, customBorder: customBorder, onRemoved: OnRemoved); return(splash); }
InteractiveInkFeature _createInkFeature(TapDownDetails details) { MaterialInkController inkController = Material.of(this.context); BuildContext editableContext = this._editableTextKey.currentContext; RenderBox referenceBox = (RenderBox)(InputDecorator.containerOf(editableContext) ?? editableContext.findRenderObject()); Offset position = referenceBox.globalToLocal(details.globalPosition); Color color = Theme.of(this.context).splashColor; InteractiveInkFeature splash = null; void handleRemoved() { if (this._splashes != null) { D.assert(this._splashes.Contains(splash)); this._splashes.Remove(splash); if (this._currentSplash == splash) { this._currentSplash = null; } this.updateKeepAlive(); } // else we're probably in deactivate() } splash = Theme.of(this.context).splashFactory.create( controller: inkController, referenceBox: referenceBox, position: position, color: color, containedInkWell: true, borderRadius: BorderRadius.zero, onRemoved: handleRemoved ); return(splash); }
void _handleTapDown(TapDownDetails details) { this._renderEditable.handleTapDown(details); }
void _handleTapDown(TapDownDetails details) { _startInteraction(details.globalPosition); }
void _onTapDown(TapDownDetails evt) { this.setState(() => { this._backgroundColor = CupertinoActionSheetUtils._kCancelButtonPressedColor; }); }
void _handleTapDown(TapDownDetails details) { this._renderEditable.handleTapDown(details); this._startSplash(details); }
void _onTapDown(TapDownDetails evt) { setState(() => { isBeingPressed = true; }); }
void _handleTapDown(TapDownDetails details) { D.assert(!this.ignorePointer); this.handleTapDown(details); }
void onTapDown(TapDownDetails details) { setState(() => { _isPressed = true; }); }
void _handleTapDown(TapDownDetails details) { this.widget.onTapDown?.Invoke(details); }
public void handleTapDown(TapDownDetails details) { this._lastTapDownPosition = details.globalPosition - this._paintOffset; }
void _handleTapDown(TapDownDetails details) { }
void _handleDoubleTapDown(TapDownDetails details) { this._renderEditable.selectWord(cause: SelectionChangedCause.doubleTap); }