public AnimationController( float?value = null, TimeSpan?duration = null, TimeSpan?reverseDuration = null, string debugLabel = null, float lowerBound = 0.0f, float upperBound = 1.0f, AnimationBehavior animationBehavior = AnimationBehavior.normal, TickerProvider vsync = null ) { D.assert(upperBound >= lowerBound); D.assert(vsync != null); _direction = _AnimationDirection.forward; this.duration = duration; this.reverseDuration = reverseDuration; this.debugLabel = debugLabel; this.lowerBound = lowerBound; this.upperBound = upperBound; this.animationBehavior = animationBehavior; _ticker = vsync.createTicker(_tick); _internalSetValue(value ?? lowerBound); }
public void resync(TickerProvider vsync) { Ticker oldTicker = _ticker; _ticker = vsync.createTicker(_tick); _ticker.absorbTicker(oldTicker); }
public static AnimationController unbounded( float value = 0.0f, TimeSpan?duration = null, TimeSpan?reverseDuration = null, string debugLabel = null, TickerProvider vsync = null, AnimationBehavior animationBehavior = AnimationBehavior.preserve ) { return(new AnimationController(value, duration, reverseDuration, debugLabel, animationBehavior, vsync)); }
AnimationController( float value = 0.0f, TimeSpan?duration = null, TimeSpan?reverseDuration = null, string debugLabel = null, AnimationBehavior?animationBehavior = null, TickerProvider vsync = null ) { D.assert(vsync != null); D.assert(animationBehavior != null); lowerBound = float.NegativeInfinity; upperBound = float.PositiveInfinity; _direction = _AnimationDirection.forward; this.duration = duration; this.reverseDuration = reverseDuration; this.debugLabel = debugLabel; this.animationBehavior = animationBehavior.Value; _ticker = vsync.createTicker(_tick); _internalSetValue(value); }