Example #1
0
        public void resync(TickerProvider vsync)
        {
            Ticker oldTicker = this._ticker;

            this._ticker = vsync.createTicker(this._tick);
            this._ticker.absorbTicker(oldTicker);
        }
Example #2
0
        AnimationController(
            float value          = 0.0f,
            TimeSpan?duration    = null,
            string debugLabel    = null,
            TickerProvider vsync = null
            )
        {
            D.assert(vsync != null);
            this.lowerBound = float.NegativeInfinity;
            this.upperBound = float.PositiveInfinity;
            this._direction = _AnimationDirection.forward;

            this.duration   = duration;
            this.debugLabel = debugLabel;

            this._ticker = vsync.createTicker(this._tick);
            this._internalSetValue(value);
        }
Example #3
0
        public AnimationController(
            float?value          = null,
            TimeSpan?duration    = null,
            string debugLabel    = null,
            float lowerBound     = 0.0f,
            float upperBound     = 1.0f,
            TickerProvider vsync = null
            )
        {
            D.assert(upperBound >= lowerBound);
            D.assert(vsync != null);
            this._direction = _AnimationDirection.forward;

            this.duration   = duration;
            this.debugLabel = debugLabel;
            this.lowerBound = lowerBound;
            this.upperBound = upperBound;

            this._ticker = vsync.createTicker(this._tick);
            this._internalSetValue(value ?? lowerBound);
        }
        public _GlowController(
            TickerProvider vsync,
            Color color,
            Axis axis
            )
        {
            D.assert(vsync != null);
            D.assert(color != null);
            _color          = color;
            _axis           = axis;
            _glowController = new AnimationController(vsync: vsync);
            _glowController.addStatusListener(_changePhase);
            Animation <float> decelerator = new CurvedAnimation(
                parent: _glowController,
                curve: Curves.decelerate
                );

            decelerator.addListener(notifyListeners);
            _glowOpacity        = decelerator.drive(_glowOpacityTween);
            _glowSize           = decelerator.drive(_glowSizeTween);
            _displacementTicker = vsync.createTicker(_tickDisplacement);
        }