Exemple #1
0
        protected override void onSingleLongTapMoveUpdate(LongPressMoveUpdateDetails details)
        {
            if (_delegate.selectionEnabled)
            {
                switch (Theme.of(_state.context).platform)
                {
                case RuntimePlatform.IPhonePlayer:
                case RuntimePlatform.OSXEditor:
                case RuntimePlatform.OSXPlayer:
                    renderEditable.selectPositionAt(
                        from: details.globalPosition,
                        cause: SelectionChangedCause.longPress
                        );
                    break;

                default:
                    renderEditable.selectWordsInRange(
                        from: details.globalPosition - details.offsetFromOrigin,
                        to: details.globalPosition,
                        cause: SelectionChangedCause.longPress
                        );
                    break;
                }
            }
        }
Exemple #2
0
 void _handleLongPressMoveUpdate(LongPressMoveUpdateDetails details)
 {
     if (!_isDoubleTap && widget.onSingleLongTapMoveUpdate != null)
     {
         widget.onSingleLongTapMoveUpdate(details);
     }
 }
Exemple #3
0
 void _handleSingleLongTapMoveUpdate(LongPressMoveUpdateDetails details)
 {
     this._renderEditable.selectPositionAt(
         from: details.globalPosition,
         cause: SelectionChangedCause.longPress
         );
 }
Exemple #4
0
 void _handleLongPressMoveUpdate(LongPressMoveUpdateDetails details)
 {
     if (!_checkVertical())
     {
         return;
     }
     _dragScrollbar(details.localPosition.dy - _dragScrollbarPositionY);
     _dragScrollbarPositionY = details.localPosition.dy;
 }
Exemple #5
0
 void _handleLongPressMoveUpdate(LongPressMoveUpdateDetails details)
 {
     if (!_checkVertical())
     {
         return;
     }
     D.assert(_dragScrollbarPositionY != null);
     _dragScrollbar(details.localPosition.dy - _dragScrollbarPositionY.Value);
     _dragScrollbarPositionY = details.localPosition.dy;
 }
        void _handleSingleLongTapMoveUpdate(LongPressMoveUpdateDetails details)
        {
            if (this.widget.selectionEnabled)
            {
                switch (Theme.of(this.context).platform)
                {
                case RuntimePlatform.IPhonePlayer:
                    this._renderEditable.selectPositionAt(
                        from: details.globalPosition,
                        cause: SelectionChangedCause.longPress
                        );
                    break;

                case RuntimePlatform.Android:
                    this._renderEditable.selectWordsInRange(
                        from: details.globalPosition - details.offsetFromOrigin,
                        to: details.globalPosition,
                        cause: SelectionChangedCause.longPress);
                    Feedback.forLongPress(this.context);
                    break;
                }
            }
        }