public ScrollDragController( ScrollActivityDelegate del = null, DragStartDetails details = null, VoidCallback onDragCanceled = null, double?carriedVelocity = null, double?motionStartDistanceThreshold = null ) { D.assert(del != null); D.assert(details != null); D.assert( motionStartDistanceThreshold == null || motionStartDistanceThreshold > 0.0, "motionStartDistanceThreshold must be a positive number or null" ); this._del = del; this._lastDetails = details; this._retainMomentum = carriedVelocity != null && carriedVelocity != 0.0; this._lastNonStationaryTimestamp = details.sourceTimeStamp; this._offsetSinceLastStop = motionStartDistanceThreshold == null ? (double?)null : 0.0; this.onDragCanceled = onDragCanceled; this.carriedVelocity = carriedVelocity; this.motionStartDistanceThreshold = motionStartDistanceThreshold; }
public DragScrollActivity( ScrollActivityDelegate del, ScrollDragController controller ) : base(del) { this._controller = controller; }
public HoldScrollActivity( ScrollActivityDelegate del = null, VoidCallback onHoldCanceled = null ) : base(del) { this.onHoldCanceled = onHoldCanceled; }
public BallisticScrollActivity( ScrollActivityDelegate del, Simulation simulation, TickerProvider vsync ) : base(del) { this._controller = AnimationController.unbounded( debugLabel: this.GetType().ToString(), vsync: vsync ); this._controller.addListener(this._tick); this._controller.animateWith(simulation).Then(() => this._end()); }
public DrivenScrollActivity( ScrollActivityDelegate del, double from, double to, TimeSpan duration, Curve curve, TickerProvider vsync ) : base(del) { D.assert(duration > TimeSpan.Zero); D.assert(curve != null); this._completer = new Promise(); this._controller = AnimationController.unbounded( value: from, debugLabel: this.GetType().ToString(), vsync: vsync ); this._controller.addListener(this._tick); this._controller.animateTo(to, duration: duration, curve: curve) .Then(() => this._end()); }
public DrivenScrollActivity( ScrollActivityDelegate del, float from, float to, TimeSpan duration, Curve curve, TickerProvider vsync ) : base(del) { D.assert(duration > TimeSpan.Zero); D.assert(curve != null); _completer = Completer.create(); _controller = AnimationController.unbounded( value: from, debugLabel: GetType().ToString(), vsync: vsync ); _controller.addListener(_tick); _controller.animateTo(to, duration: duration, curve: curve) .then(o => _end()); }
public virtual void dispose() { this._del = null; }
public void updateDelegate(ScrollActivityDelegate value) { D.assert(this._del != value); this._del = value; }
public ScrollActivity(ScrollActivityDelegate del) { this._del = del; }
public IdleScrollActivity(ScrollActivityDelegate del) : base(del) { }
public virtual void dispose() { _del = null; }