コード例 #1
0
 void hideToolbar()
 {
     D.assert(_toolbar != null);
     _toolbarController.stop();
     _toolbar.remove();
     _toolbar = null;
 }
コード例 #2
0
 public void _handleAnimationUpdate(AnimationStatus status)
 {
     if (status == AnimationStatus.completed || status == AnimationStatus.dismissed)
     {
         _proxyAnimation.parent = null;
         D.assert(overlayEntry != null);
         overlayEntry.remove();
         overlayEntry = null;
         manifest.fromHero.endFlight(keepPlaceholder: status == AnimationStatus.completed);
         manifest.toHero.endFlight(keepPlaceholder: status == AnimationStatus.dismissed);
         onFlightEnded(this);
     }
 }
コード例 #3
0
        void finishDrag(_DragEndKind endKind, Velocity velocity = null)
        {
            bool wasAccepted = false;

            if (endKind == _DragEndKind.dropped && _activeTarget != null)
            {
                _activeTarget.didDrop(this);
                wasAccepted = true;
                _enteredTargets.Remove(_activeTarget);
            }

            _leaveAllEntered();
            _activeTarget = null;
            _entry.remove();
            _entry = null;

            if (onDragEnd != null)
            {
                onDragEnd(velocity == null ? Velocity.zero : velocity, _lastOffset, wasAccepted);
            }
        }